-
Notifications
You must be signed in to change notification settings - Fork 5
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
poll sensors/switches when the plugin starts. #5
Comments
expanding on this issue, I use Xiaomi Aqara wall switches and sometimes the messages are lost. That means that Home Assistant tells a certain state (switch on) but the real state is the other way around. It is cumbersome. I was planning to add this feature, but was unable to find the command of "get state of a switch" here. Any advice on how to support that feature? Easiest way to achieve that? A safe poll (say, every 5 minutes, and make the interval configurable) seems to be robust and IMHO it would not saturate the zigbee network. |
You can ask values from device using command 0x0100. You need to know endpoint, cluster and parameter id. You can find cluster id and parameter from Zigbee cluster documentation (I have been using document JN-UG-3115) pyzigate has function for that, its called read_attribute. It should have good enough comment to get you started. (https://github.com/elric91/ZiGate/blob/54bc898b00d692a0183e8f7cd354b40ca0a103a8/pyzigate/commands_helpers.py#L5) If you need to findout which cluster and endpoints your device have, take a look for issue #1. There is commands for those. |
It could be possible to send polling command after device is initialized on hass. There is two problems:
Anyone having any progress with this? |
Not exactly your preferred solution, but good enough for me: #22 |
when HA starts, is there a way to make it poll every registered sensors ?
Sensors don’t talk quite often if there’s no significant changes, I guess I could restore states from before but I’d prefer to poll them instead.
Is that possible ?
The text was updated successfully, but these errors were encountered: