Hi - I’m trying to figure out the correct automation code to:
1.) turn on an Insteon switch
2.) at 5:00 AM
3.) only Monday thru Friday
4.) If someone is at home
5.) Otherwise leave the switch to off
I have an Entity created already called “somebody is home” with the desired people configured correctly. Using HA’s built in proxmity integration for presence detection.
Here is how I currently have my automation setup:
alias: Turn on hot water weekdays at 5:00 AM if somebody home
description: ""
trigger:
- platform: time
at: "05:00:00"
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
after: "00:00:00"
- condition: state
entity_id: group.somebody_home
state: home
action:
- type: turn_on
device_id: 12bcf556f376cc281824e0adffcaa8b7
entity_id: switch.on_off_module_36_46_84
domain: switch
mode: single