My wemo sensor was recognised as binary_sensor.garage_motion. HA able to display when there is motion detected. I tried to automate with a simple script to see if this is working. But it doesn’t trigger the action to turn on my switch light. Below is my configuration:
I tried that to: 'on’ but it still not working.
I have also added from: 'off’ then follow by to: 'on' , still not working.
I wonder if there is documentation somewhere to find the state change?
The following should work. Make sure you have it indented properly like below. And, check your log file for any Errors or Warnings after restarting HA.
alias: Turn on garage light
trigger:
platform: state
entity_id: binary_sensor.garage_motion
to: 'on'
action:
service: switch.turn_on
entity_id: switch.garage_light