claudegel / sinope-zha

This is a custom quirks for sinope zigbee devices for testing before it is added to zha-device-handlers. It also explain how to setup those quirks in Home Assistant to use and test them before they are merged in zha-device-handlers
GNU General Public License v2.0
26 stars 5 forks source link

SW2500ZB & DM2500ZB #11

Closed frangigu closed 8 months ago

frangigu commented 1 year ago

Hi Claude,

Not sure if is an issue and if it can be fixed, but I do have many Sinope Switches and Dimmers, reported device temperature is wrong.

All devices are showing 0.2C or 0.3C. It looks like the device_temperature value is divided by 10 while it should not be divided. image

Not sure if this is Sinope that is not following the standard. Is this something that could be overwritten or changed in the switch.py ?

I am Java programmer but I know nothing about Python, not sure where to start and help ;( .

claudegel commented 1 year ago

Should be easy to fix. I did the same type of correction for wall oulet that was reporting bad load value. Let me check on mine. For light and dimmer the correction will be in light.py not switch.py

claudegel commented 1 year ago

On my side device temperature is 0.3 and in cluster 0x0002, attribute 0x0000 temperature = 31 So it should be multiplied by 100. I'll try something

claudegel commented 1 year ago

OK my dimmer and light are reporting correct temperature in the cluster 0x0002, attribute 0x0000 But ZHA is doing a division by 100. So the bug is in the ZHA code not in the sinope quirck. In the device temperature cluster 0x0002 there is no divisor or multiplier attribute so we cannot change there value to get the wright number for temperature.

I'll check in the ZHA code to find out where they get pr change the value for device temperature.

frangigu commented 1 year ago

Thanks for the quick response and updates

frangigu commented 8 months ago

I just noticed that numbers are now showing properly for my light switches. Not sure if it is after updating from your changes or a HA change.

claudegel commented 8 months ago

I've fix it by adding 100 to the attribute value. All temperature are set as celcius100 except for that attribute so I've made a little catch to transform the value as celcius*100 before it is used by ZHA

frangigu commented 8 months ago

Thanks for the change