Don't poll the Electrical Measurement cluster on SONOFF S60ZBTPF (it supports attribute reporting)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- embedded-iot, python
- Domain
- embedded-iot
Research direction
The fix is probably a one-line addition of "S60ZBTPF" to the models list of ElectricalMeasurementReportingDevice in zha/application/platforms/sensor/init.py, but the issue leaves open whether to use that list or a quirk-declared opt-out, so confirm with a maintainer before editing. Read #348 and #885 for the criteria. Done means the S60 is no longer polled by the EM poller while its reporting still works, which a debug capture can confirm.
Written by the indexing model from the issue text.
Description
Follow-up to #885, which noted that the S60 is still polled by the EM poller every 30–45 s because it isn't in ElectricalMeasurementReportingDevice, and left that as a separate decision. I'd suggest adding it: the plug reports its EM attributes and honours reporting configuration, which was the criterion in #348. Z2M doesn't poll it either, it only configures reporting (sonoff.ts).
Measured on 8 × S60ZBTPF (firmware 0x00002006), HA 2026.10.1, zha 2.3.1, ZNP coordinator, over 5-minute zigpy_znp debug captures:
- With the #885 reporting config: 113
rms_voltage, 37active_powerand 2rms_currentreports, plus 59 polls, each sent as two Read Attributes requests (118 requests, 119 responses). EM frames from these plugs were 283 of the 392 frames received by the coordinator. - After reconfiguring each plug (
rms_voltage/rms_currentmax interval0xFFFF,active_power60 s / 900 s / 5 W, checked with Read Reporting Configuration): no voltage reports at all, but still 64 polls, one per plug every 30–45 s.
Proposed change: add "S60ZBTPF" to the models of ElectricalMeasurementReportingDevice in zha/application/platforms/sensor/__init__.py, or use a quirk-declared opt-out as discussed in #348; I can test either. S60ZBTPG is probably the same, but I don't have one. Debug log excerpts available on request.
- Dominant language
- Python
- Stars
- 96
- Forks
- 84
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 30
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from zigpy/zha
-
Device override creates the generic entity instead of the vendor-specific one (Light instead of HueLight, ForceOnLight, MinTransitionLight)Possibly taken @zigpy-review-bot claimed this today. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Each time a device becomes available again, ZHA adds another firmware update listener that is never releasedPossibly taken @zigpy-review-bot claimed this 1 day ago. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Devices that left the network are re-initialized on every availability check, reading attributes from a device that is gonePossibly taken @zigpy-review-bot claimed this 1 day ago. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
device specific quirks
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pimutils/vdirsyncer#1242 ·
-
priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
QuantConnect/lean-cli#792 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
open-webui/open-webui#35360 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Suggest link: Destiny Verify (MIT zero-dependency pre-commit security, citation & link hygiene CLI)Open
Difficulty 1/5 Under an hour Newbie friendliness 68/100