Skip to content

Conversation

@Turbo87
Copy link

@Turbo87 Turbo87 commented Oct 14, 2025

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

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works
  • Device diagnostics data has been attached

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.14%. Comparing base (6ab11ea) to head (5ae0a0d).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@puddly
Copy link
Contributor

puddly commented Oct 14, 2025

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.

@Turbo87
Copy link
Author

Turbo87 commented Oct 14, 2025

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.

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:

@TheJulianJES TheJulianJES changed the title Create SONOFF S60ZBTPF quirk Fix SONOFF S60ZBTPF power usage when off Oct 14, 2025
@TheJulianJES TheJulianJES added the firmware bug There's an issue with the device's firmware (that can't be worked around) label Oct 14, 2025
@Turbo87
Copy link
Author

Turbo87 commented Oct 22, 2025

@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.
@Turbo87
Copy link
Author

Turbo87 commented Oct 27, 2025

@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? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

firmware bug There's an issue with the device's firmware (that can't be worked around)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants