-
Notifications
You must be signed in to change notification settings - Fork 4
Update entities after turning on/off entity #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have added code to notify HA of changes in mertik data. Calculation of Switch on/off is still delayed, as mertik flags does not tell that is on nor that it is igniting before much later. Maybe #10 will reveal how logic can be improved |
I think it will be a good idea to rewrite the process response method now that we know a bit more about the structure of the request/response (#10). This way it will not only update on a status refresh but directly on the response you receive when you send a request to do something. I'll create a new issue later today describing my idea in more detail. PS. I think it's best to start working on this after |
Not sure I understand "This way it will not only update on a status refresh but directly on the response you receive when you send a request to do something". It already processes the response if there is any and HA is updated. Only exception I know is SetFlameHeight, that does not have a response, so a status update is requested |
When you execute a command (say turning the light on or off) you get a response from the WiFi-module with the current status. I now see that you added code to directly reflect the change in Home Assistant instead of awaiting the response. I did a quick test and it didn't work as expected. I'll try to test later this week. |
Currently the status of the entity is not directly updated after turning it on/off (for instance the light). I think this is because the status is not processed after executing the action (only every 10 seconds using the
refresh_status()
method).The text was updated successfully, but these errors were encountered: