Hey,
I bought an Sonoff SNZB-02 and noticed it only reported, when temperature changed > 0.5 degrees or after 15 minutes.
That is way too much, and the reporting interval for the humidity is too high.
Is there any way to change this ?
I tried it with the cluster Command tolerance but it didn’t work (I was also missing the Manufacturer Code Override)
I heard there is a Setting in Zigbee2Mqtt, but I’d rather stay on ZHA.
Is there any way to set this ?
Edit I found out that it apparrently it is possible to do so while reconfiguring, if someone could point me in the direction where this is done in code, I could look into it.
That seems to be handling UI Input if I understand that correctly, for the start it would be easier to get the data from the configuration.yaml instead
EDIT: just read that YAML Config is no longer being accepted.
I still don’t quite get all the Strings with config_flow, but I think I am getting into it.
OK I got as far as using async_get_zha_config_value to get the Value from the Configuration,
Unfortunately, I need the data in the file measurement.py, however async_get_zha_config_value needs the config entry from the gateway, in the other components like light.py they can just call zha_device.gateway.config_entry.
However, I have not found a way to get to the config_entry in the measurement.py file.
I think after I find that out it should be good to go.
The most generic implementation would be to add a service into zha (services.yaml, and related python files) so that a reporting configuration can be sent to any cluster for any attribute. This is available from Developer Tools and can as far as I understand it be used as an action (in automations, etc
I think that the report configuration is only sent when the device is added to the zigbee network or when you explicitly request to reconfigure it. So setting it manually later on should do the trick and one could create an automation to revive the setting if needed.
I haven’t checked it out yet, but it looks like a good starting place to add missing “services” with regards to Zigbee. The ‘services.yaml’ looks rather empty though.
Update:
I cloned the repository to add a version number to the manifest, start a readme with some examples, and made some tests.
From the developer tools, one can call a command in developer mode, using yaml.
The available commands can be found in _init.py (they start with command_handler) and the implementations are in the accompanying python files.
So this is a good start, but needs tuning and extra commands.
I updated the zha_custom component I mentioned above and I was able to change the temperature reporting configuration on a SonOff Temperature sensor by calling the service from the “Developer Tools > Services”.