Hello
I’m trying to setup like this:
- When I ask for turn on the lamp, hassio should check the light sensor
- If light sensor =1 (lamp already ON by manual switch) so do nothing
- If light sensor =0 (lamp currently OFF) so turn on the lamp
Can you please advise
- alias: Lamp ON
trigger:
platform: event
event_type: ifttt_webhook_received
event_data: "lamp1on"
condition:
platform: state
entity_id: sensor.lamp
to: "0"
action:
service: switch.turn_on
entity_id: switch.lamp