Mat931 / digitalstrom-homeassistant

digitalSTROM integration for Home Assistant
MIT License
14 stars 1 forks source link

State latency #10

Open djacid opened 9 months ago

djacid commented 9 months ago

Hello, first of all thank you very much for this custom component! Finally, we can add our digitalstrom server to Home Assistant. I have noticed that update of the light state on Home Assistant is delayed. What I mean is that if you press the physical switch, Home Assistant needs a lot of time to update the light state.

Is this something that I can fix? Thank you in advance!

Mat931 commented 9 months ago

Hi, Unfortunately that is a flaw of the digitalSTROM system. It notifies Home Assistant about state changes in some devices like sensors but for others we need to poll the state. I haven't experimented with increasing the polling rate but that would put additional load on the digitalSTROM system. Another approach would be when a button press event is received from DS to try and find out which light is controlled by it and only poll the state of that light immediately.

djacid commented 9 months ago

The second approach seems more efficient for the system. Is it something that you will give a try?

steinerma commented 9 months ago

Hello thank you very much for the digitalSTROM integration! I noticed that the digitalSTROM server (dSS20) probably has to process a lot of data (or is queried by Home assistant). This manifests itself in the fact that the light in particular switches on very slowly (up to several seconds) when the button is pressed. However, this only happens if the light is processed via the scene responder (server performance). I have various lighting groups where the motion detector switches several scenarios in other dSM groups.