HADashboard-activated scene, automation issue

Hi all,

I’ve just set up HADashboard and I’ve configured a dashboard where I can set some of my scenes. In HASS, I have some automations configured to execute when some of the scenes are set, for instance:

- id: arm_alarm_when_goodnight_scene_is_activated
  alias: Arm alarm when I go to sleep
  trigger:
    platform: event
    event_type: call_service
    event_data:
      domain: scene
      service: turn_on
      service_data:
        entity_id: scene.going_to_bed
  action:
    - service: alarm_control_panel.alarm_arm_home
      data:
        entity_id: alarm_control_panel.alarm_panel

When I activate the scene through the HASS UI, or through Homebridge, this works fine. However, when I activate it via HADashboard, it doesn’t fire, i.e. the scene is set, but the automation is not triggered.

Any clues?

Thank you

what do you have in your dashboard?

going_to_bed:
  widget_type: scene
  entity: scene.going_to_bed
  title: Going to bed

layout:
  - going_to_bed

i just checked and the scene widget uses the service homeassistant/turn_on instead off scene/turn_on
you could solve your problem by copiing the files scene.yaml i the widgets dir to the custom_widgets dir.

rename it to something like my_scene.yaml and use that in your widgets_type

in that yaml file change homeassistant/turn_on to scene/turn_on.

1 Like

Thank you ReneTode for your suggestion. Actually, since it was just the trigger that was causing the issue, I’ve modified my automation to be triggered by both service domains (scene and homeassistant). It works fine now.

Thanks again

1 Like

Do i need to create which dirs inside appdaemon folder to use the scenes.yaml?

that is about custom widgets.
you first need to learn about normal widgets.