Hi,
I am trying to create an automation so when I click on the power on button of the Philips Hue Dimmer Switch it turns on my fan (driven by a simple wifi switch).
Is anybody able to help, I’ve tried the below logic however is not working.
id: ‘1552121464314’
alias: Turn on fan downstairs
trigger:
entity_id: sensor.downstairs_bathroom_light
from: ‘off’
platform: state
to: ‘on’
condition:
action:
I’m not sure if your formatting is correct and there’s some unnecessary/incorrect properties. I believe it’s data_template not data in your action for e.g. but you don’t need that in this case.
Try this:
- id: "1552121464314"
alias: Turn on fan downstairs
trigger:
platform: state
entity_id: sensor.downstairs_bathroom_light
from: "off"
to: "on"
action:
service: switch.turn_on
entity_id: switch.outside_light
Note that this is not interacting with your Hue dimmer switch, but reacting to what the switch controls.
Thanks, I have this working the way I want, for reference the code is below. I am triggering when the light turns on since it can be switched on by more than just the dimmer switch (ie. Philips Hue app).
- id: '1552118098484'
alias: Turn on fan when switch downstairs bathroom light triggers
initial_state: true
trigger:
- entity_id: light.downstairs_bathroom_light
from: 'off'
platform: state
to: 'on'
for:
minutes: 2
condition: []
action:
- data:
entity_id: switch.downstairs_bathroom_fan
service: switch.turn_on
- id: '1552118237753'