Open iMicknl opened 4 years ago
Just found a reference to stateRefreshCommand
in https://www.tahomalink.com/enduser-mobile-web/steer-html5-client/vendor/somfy/io/alarm/alarm.js. Is worthwhile to investigate.
stateRefreshCommand: {commands: "refreshState", label: i18n.refreshState},
The HomeKit (via homebridge) integration is also calling this endpoint every x minutes (based on user setting). We could add this as well, next to our regular data update coordinator.
What about doing this automatically if we detect a device required it ?
What about doing this automatically if we detect a device required it ?
I had the same thought this morning, would make a lot of sense. Just enable this for the devices where we require it and don't make it user configurable.
Is your feature request related to a problem? Please describe. When we move towards using an event based approach for updating states (#1), it would be good to understand if we need to refresh the states manually for specific devices, or if we can do it in batch.
For example;
io:DiscreteGateOpenerIOComponent
usesrefreshPedestrianPosition
(#40)io:SimpleExteriorHeatingIOComponent
usesgetLevel
possibly (#161) and there are more exampleseliot:OnOffLightEliotComponent
usesrefreshAllLightStates
(#230)Describe the solution you'd like Getting rid of manually calling all refresh endpoints would be best, or scheduling a refresh of all states periodically.
Describe alternatives you've considered Maintaining a list of states that have to be refreshed manually.