Hi All, can anyone please tell me what im doing wrong? I built this using the Automation UI but it doesn’t work. I’ve tested all the individual bits and am puzzled as to why such a simple automation does nothing.
The logic is Simple IF nest away changes from “off” to “on” THEN turn “off” Lounge Light.
- id: '1536901814097'
alias: Turn Off Lounge Light
trigger:
- entity_id: binary_sensor.kilsyth_villa_away
from: 'Off'
platform: state
to: 'On'
condition: []
action:
- data:
entity_id: switch.lounge_light
service: switch.turn_off
Overreacting a bit aren’t you. I already covered that the config was generated by the UI so indentation was highly unlikely to be the issue (and wasnt).
It’s a non-dimmable Wemo Light switch and that is what is in the config files, so that is what I used. It always worked by itself and calling the entity via json always worked too.
I just failed to realise that for the automation config I needed to stick to lowercase for the binary sensor values as the UI always capitalized the on/off.
It’s not that you always have to use lower case. It’s that you always have to match the case. Most times things will be all lower case. Sometimes things will be capitalized. Just make sure the code matches the reported state.