Closed script0803 closed 2 weeks ago
The main reason is that the previous 'await readMeteringPowerConverterAttributes(endpoint)' was deprecated and changed to 'await reporting.readMeteringMultiplierDivisor(endpoint)' I neglected it when I wrote it last time, which led to the problem that energy and produced_energy could not be read. And I found that our device will only report data when energy and produced energy change by 0.1. Therefore, when the device only measures energy, produced energy will still not be reported, so I changed 'change' to 0, so that both energy and produced can be reported. As for the reporting interval of 5 to 3600, this is consistent with our other products and will not have a big impact.
As you can see in the issue https://github.com/Koenkk/zigbee2mqtt/issues/22429, this update only fixes this bug and does not affect other functions.
still weird to filter/limit the readings, as this could still create some "weird" corner cases when reporting jumps from import to export or the other way around, but I guess it's ok when your other devices behave the same.
Could you explain what the issues were or why the change is needed?
Filtering out high readings >3600 and low ones seems like an odd decision, why 5 and 3600? that seems like an odd choice of values....
Edit: I guess if found the issue: https://github.com/Koenkk/zigbee2mqtt/issues/22429
But I am still not seeing how the limits make sense.