Turn off 3 zigbee dimmers when I arm the alarm

Hi guys. I’m new to Home Assistant. Coming from OpenHAB.
I have an LK IHC house, also called Elko in other countries.
I have 3 Zigbee dimmers. Controlled by outputs of the IHC installation, and also in Lovelace from the zigbee entities(which allows me to see if the dimmer is on or off, and at what percantage. Gotta love HA).
But I use “Turn everything off” in the IHC, when we arm the alarm system. For this to work with the Zigbee dimmers, and the IHC not knowing if the dimmers are on or off, It should be easy to do in HA, but all attempts has failed so far.

This is what I made in Automations. If I press run, it works fine - Turns off all 3 Zigbee dimmers. But I can’t get it to follow an entity (which is just a fake output on the IHC)
I cant get it to follow any entity, either the fake one or some of the real ones.
From google’ing Im pretty sure I’m doing something wrong, but I cannot figure out what.

  • id: ‘1639954732954’
    alias: Sluk Dæmpere
    description: ‘’
    trigger:
    • platform: state
      entity_id: light.stue_68187
      condition:
      action:
    • service: light.turn_off
      target:
      entity_id:
      • light.0x84fd27fffe72cac3
      • light.0x804b50fffeb943a5
      • light.0xb4e3f9fffeae9afc
        mode: single

It looks like your trigger doesn’t have a state that it needs to change to/from.

Unfortunately you didn’t use code markup, as explained in the sticky post.

However, it looks like your trigger is when the light changes state, or any attribute changes, which isn’t what you wanted.

trigger:
- platform: state
  entity_id: light.stue_68187
  to: 'off'

Assuming that light is the fake entity you mentioned

Sorry. thought I did code block correctly.
I tried both from and to, and on and off.
It wont run the action.

If I press Run, it works fine. So its the trigger somehow. Tried using a normal lamp entity, so I could see it turn on and off, but it does not run the action.

  alias: Sluk Dæmpere
  description: ''
  trigger:
  - platform: state
    entity_id: light.stue_68187
    to: 'off'
  condition: []
  action:
  - service: light.turn_off
    target:
      entity_id:
      - light.0x84fd27fffe72cac3
      - light.0x804b50fffeb943a5
      - light.0xb4e3f9fffeae9afc
  mode: single

This should help, the trace will tell you what’s going on.

Did not get any trace entries. Turned out theres something buggy in the IHC integration. I was not getting data from the IHC. All entities looked turned off in lovelace even though they where on. Had to turn the entities on and then off again to turn them off. But after a hard reset of HA and IHC the off automation works flawlessly when I turn on the alarm.

Thanks.