bob1de / hass-apps

Some useful apps and snippets to empower Home Assistant and AppDaemon even more.
Apache License 2.0
85 stars 23 forks source link

[schedy] Unknown domain from AppDaemon #53

Closed brightdroid closed 3 years ago

brightdroid commented 3 years ago

Using generic2 with this template:

  actor_templates:
    default:
      template: light

    light:
      # retries
      send_retries: 1
      # send_retry_interval: 30

      attributes:
        - attribute: brightness_pct
        - attribute: color_temp

      values:
        # off
        - value: [0, "*"]
          calls:
            - service: light.turn_off

        # on, ...
        - value: ["*", "*"]
          calls:
            - service: light.turn_on
              data:
                brightness_pct: "{attr1}"
                color_temp: "{attr2}"
                transition: "10"

and a sample schedule like this:

- x: '[85, 300] if float(state("sun.sun", "elevation")) > 15.0 else Next()'

I'm getting this errors:

INFO tradfri_led_temp: --- [R:Livingroom] Setting value to (85, 300).  [scheduled]
INFO tradfri_led_temp: <-- [R:Livingroom] [A:light.wohnzimmer] Setting value (85, 300) (left tries = 2, interval = 30).
INFO tradfri_led_temp: <-- [R:Livingroom] [A:light.wohnzimmer] Calling service 'light/turn_on', data = {'brightness_pct': 85, 'color_temp': 300, 'transition': 10, 'entity_id': 'light.wohnzimmer'}.
WARNING AppDaemon: Unknown domain (default/light) in call_service from tradfri_led_temp
bob1de commented 3 years ago

Hi,

At first glance, Schedy seems to call the service correctly. Have you tried calling the service manually? Something like:

self.call_service("light/turn_on", entity_id="light.wohnzimmer", brightness_pct=85, color_temp=300, transition=10)

You could create an app for testing and call the service in initialize. If that throws the same warning, the issue is AppDaemon-based.

Best regards Robert

brightdroid commented 3 years ago

Seems to be an issue in Appdaemon 4.0.3, the docker tag "latest" wasn't updated: AppDaemon/appdaemon/issues/1026

Now with v4.0.5 it works again.

Thank you