automation:
- alias: "Close Garage Door if open after sunset"
trigger:
- platform: sun
event: 'sunset'
offset: '00:30:00'
condition:
- condition: state
entity_id: cover.garage
state: 'Open'
action:
- service: cover.close_cover
entity_id: cover.garage
- service: tts.google_say
entity_id:
- media_player.kitchen_home
- media_player.gaming_room_home
data_template:
message: "Buggar. The garage door was left open so I just closed it four you"
Thanks, I’ll try that. I used the template editor and put {{states('sensor.garage_status')}} and it reported Closed so thought it was capitalised. But your right, it shows as open/closed in the states panel!
FYI, I’ve changed the power supply from 5.1V/1A to 5.1V/2.5A and it seems to be more reliable. 1A should be plenty but the ping results are far more reliable on a dedicated Raspberry Pi power supply.