Hi ya all.
so im quite new to home assistant and I am having issues with a relay and door lock.
ok so i can control the door lock via mqtt, i can manually turn it on and off. i am now trying to configure HA to turn the relay off after 15 seconds.
i am using a esp-01 to control a relay that runs to a door latch.
the entity is switch.shed_door
i just cant work the code out at all. I could change the arduino code on the esp but down the track its easier to mod the HA config rather than the arduino code.
automation:
- alias: Turn off relay after a delay
trigger:
platform: state
entity_id:switch.shed_door
to: ‘off’
for:
seconds: 15
action:
service: homeassistant.turn_off
entity_id: switch.shed_door
seems not to work. i guess i got it wrong somewhere
any assistance would be great
thanks in advance