Hi guys
I have a mock light that I light up from apple homekit “when first person come home” and turn it down “when the last person leave home” these are super reliable automation from apple homekit that works flawlessly…
That is a great way to track that my home occupied.
I have a lot of automation in HA then attached to the state of that mock light.
Unfortunately the light turns off after HA reboot and that is pain.
Here is how the mock light is set up, just use a dummy script(script.mock_light_toggle) that does nothing:
I`m using light as it is the easiest way to trigger it form homekit.
#mock light for occupancy detection
- platform: template
lights:
house_occupied_mock_light:
friendly_name: “house_occupied”
icon_template: mdi:home-outline
unique_id: house_occupied_mock_light
turn_on:
service: script.mock_light_toggle
turn_off:
service: script.mock_light_toggle
Is there a an easy way to keep the state of YML light it after HA reboot?