-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
deviceAvailability publishes message even if there is no change in availability #2296
Comments
This doesn't seem to hard to fix, I will open a PR for this next week when i have a bit more time. (Probably on monday) The current idea is to a hash with the name -> availability mapping and then check here if the current state differs from the stored one. If so publish and update the hash. That way we should only get available mqtt message when the state has changed. |
Better yet, it seems this info is already available in |
PR opened, the change was minimal |
Thanks! merged, therefore closing this. |
Bug Report
What happened
I configured availability_timeout of 300 (5 minutes) as I am really only interested in the polling of the color after some of my hue bulbs lose power.
What did you expect to happen
I would expect NOT to get an available = online repeat message in the if one was already sent.
Currently devices like the ikea repeater publish the available message every 5 minutes due to the timer, other bulbs that publish reports never post available = online after the one at startup.
How to reproduce it (minimal and precise)
Set a long timeout and you'll notice if you have devices that are very active vs one that are not.
Debug Info
zigbee2mqtt version:
1.6.0 (commit #00bc4de)
CC253X firmware version:
{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190425}}
The text was updated successfully, but these errors were encountered: