Hi,
I have a Philips Hue wall switch with a bridge (no ZigbeeMQTT integration). When un push the button, I’ve got this event :
event_type: hue_event
data:
id: interrupteur_salle_a_manger_button
device_id: d97dd6db2be4fd865104f55725e4fe84
unique_id: 4b6ee069-b01e-4b17-a2a4-49c0e7f1bbb7
type: initial_press
subtype: 1
origin: LOCAL
time_fired: "2022-12-09T06:30:52.879166+00:00"
context:
id: 01GKTS8R6FW2NA6QD1JP7V1FZ1
parent_id: null
user_id: null
When the button is press, I’d like to switch another light (light.guirlande_entree_switch) according to the status of Philips Hue light. If one Hue light (light.abat_jour_salle_a_manger) or more have status ‘On’ in the room, switch should be turn on, otherwise, switch should be turn off.
I’ve tried the following automation but it doesn’t work…
id: '21'
alias: 'Switch Button - 1'
description: ''
trigger:
- device_id: d97dd6db2be4fd865104f55725e4fe84
domain: hue
platform: device
subtype: 1
type: initial_press
action:
- delay:
secondes: 3
- service: >
{% if "{{ states('light.abat_jour_salle_a_manger') == 'on' }}" %}
switch.turn_on
{% else %}
switch.turn_off
{% endif %}
entity_id:
- light.guirlande_entree_switch
Thanks you for your help.