Closed melobytes closed 4 months ago
Hey there @cgtobi, mind taking a look at this issue as it has been labeled with an integration (netatmo
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
netatmo documentation netatmo source (message by IssueLinks)
@melobytes Thanks for your investigation
is it possible that the delay depends on the pooling rate homeassistant is taking to refresh the status of the dimmer? however it seems that the delay is not constant so probably something else is happening
Exactly that. Netatmo does not provide webhook events for those devices as far as I am aware of.
Indeed, I've observed that only a few devices support webhooks, specifically those from Netatmo, not Bticino. I'm curious as to why Alexa and Google/Nest Home updates are so prompt when the developer hasn't made webhooks available. What is Home Assistant missing that these services have? Aren't the same Netatmo development tools available across all platforms? The exposed api should be the same for everyone
That is a fair question. To be honest, there might be more undocumented events, but someone with access to the device has to test that. You can do that in the HA developer tools events section once webhook is registered.
i guess that in order to update the dimmer, HA would fire a /homestatus event, right? if so, where can i find this call? maybe after setting the status of a switch, it is appropriate to call again the /homestatus request in order to get the new value? i think google would poll each second or a couple of seconds while i do not know what is the knob for HA (what is the trigger to get an update?)
We already have a force update mechanism but on the other hand we also have a rate limit that we have to work within.
where is the force update implemented? and what about the limit? could you also please point me out where we are doing the /homestatus request? Thanks for your prompt response and your help
The actual calls against /homestatus etc are done in pyatmo the underlying lib. If you want to get deeper into that I'd rather suggest to chat about this on Discord.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
I've integrated a Legrand k4411c with Home Assistant. The switch functionality for turning the lights on and off works well, but I'm experiencing issues with the dimming feature. Specifically, setting the brightness to 51% in Home Assistant results in the dimmer adjusting to 89%.
To address this, I found that in the
netatmo/light.py
file, the brightness level was being sent as a raw value. I modified the code to correctly scale the brightness value:await self._dimmer.async_set_brightness(round(float(kwargs[ATTR_BRIGHTNESS])*100/255))
With this change, the dimming now operates correctly. However, there is a significant delay in the update of the brightness value. When I make a change to the brightness, it takes some time for the correct value to be reflected. I'm currently using a webhook with Nabu Casa for updates.
What version of Home Assistant Core has the issue?
2024.4.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Netatmo
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response