I have an automation rule that fires if a switch is triggered. The only problem is that the switch does not return to it’s initial (off) position. Is there any way through which I can set the state of a switch through automation?
- alias: 'Deurbel notify'
trigger:
- platform: state
entity_id: switch.deurbel
to: 'on'
action:
service: notify.pushbullet
data_template:
title: "Deurbel"
message: "Er staat iemand voor de deur"