isalkind / homebridge-away-mode

Homebridge plugin that provides triggers to turn on and turn off lights to simulate occupancy.
MIT License
26 stars 5 forks source link

Keep switch state on restart #8

Closed Daeny85 closed 3 years ago

Daeny85 commented 3 years ago

When the Homebridge service is restarted the switch (Away Mode) loses its state. If you are not at home and the switch (Away Mode) is active it will be deactivated by restarting the Homebridge. So the presence simulation will not work anymore. The switch should save the state so that after the restart the state is the same as before the restart.

isalkind commented 3 years ago

Main switch (Away Mode) will save last known state and restart activity on restart if the switch was last active.

@Daeny85 Please take a look at version 1.5.1. This should address your issue.

Daeny85 commented 3 years ago

Thank you. It works well.