- 
                Notifications
    You must be signed in to change notification settings 
- Fork 899
Fix SONOFF S60ZBTPF power usage when off #4401
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
base: dev
Are you sure you want to change the base?
Conversation
| Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff             @@
##              dev    #4401      +/-   ##
==========================================
+ Coverage   92.12%   92.14%   +0.02%     
==========================================
  Files         358      359       +1     
  Lines       11917    11948      +31     
==========================================
+ Hits        10979    11010      +31     
  Misses        938      938              ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
| Is attribute reporting correct setup for the device? I feel this should be fixed in firmware, let me see if I can get in touch with Sonoff. | 
d55ec7c    to
    d7ad77e      
    Compare
  
    | 
 no idea, to be honest. my knowledge of Zigbee is admittedly very spotty 😅 I did notice that https://github.com/Koenkk/zigbee-herdsman-converters/blob/v25.44.0/src/devices/sonoff.ts has a similar setup though: | 
| @puddly any news from SONOFF? | 
The power and current values of the SONOFF S60ZBTPF and S60ZBTPG are not correctly reset to zero when the switch of the socket is turned off. Similarly, these devices sometimes even send power and current updates even after the switch was turned off. This commit creates a custom quirk for the two devices to fix the broken behavior. I've only tested this with the SONOFF S60ZBTPF devices I have, but, judging by https://github.com/Koenkk/zigbee-herdsman-converters/blob/v25.44.0/src/devices/sonoff.ts#L2020, this should also apply to the S60ZBTPG.
d7ad77e    to
    5ae0a0d      
    Compare
  
    | @TheJulianJES how do things usually work around here? is there anything blocking this from getting merged? can I do anything to make this easier to review/merge? :) | 
Proposed change
The power and current values of the SONOFF S60ZBTPF and S60ZBTPG are not correctly reset to zero when the switch of the socket is turned off. Similarly, these devices sometimes even send power and current updates even after the switch was turned off.
This commit creates a custom quirk for the two devices to fix the broken behavior. I've only tested this with the SONOFF S60ZBTPF devices I have, but, judging by https://github.com/Koenkk/zigbee-herdsman-converters/blob/v25.44.0/src/devices/sonoff.ts#L2020, this should also apply to the S60ZBTPG.
Additional information
There is another PR open for these devices (#4075). It does not include this behavior, but could lead to conflicts if both are merged.
Device diagnostics
zha-01K24VJZR720MWGQRRMV7SJXKA-SONOFF S60ZBTPF-c12ee740449ac3ce873406a19639cb30.json
Checklist
pre-commitchecks pass / the code has been formatted using Black