Closed gioragen closed 4 years ago
You use a status cache of infinity (-1). Meaning the status is never actually queried (is the equivalent of setting the switch to switchType: "toggle"). The default behavior would be, that the switch queries your http endpoint every time HomeKit queries the state of your switch. This includes also the first call (aka initial status).
After restarting homebridge, the stateful http switch doesn't call to get its initial status, it gets status only when the switch is actively changed.
If the switch is on after restarting homebridge I would expect it to be initialized as "on".
I also tried to play with the "statusCache" option but it doesn't seem to fix it.
─ homebridge @ 0.4.52 ─ homebridge-http-switch @ 0.5.27
Configuration