Skip to content

Commit

Permalink
Provide 'reportable_change' in anwser and clarify button press for sl…
Browse files Browse the repository at this point in the history
…eepy devices
  • Loading branch information
mdeweerd committed Oct 27, 2023
1 parent fe1a39d commit c38b741
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1022,9 +1022,11 @@ Set the minimum and maximum delay between two reports and set the level of
change required to report a value (before the maximum delay is expired).

This example configures Temperature reporting on a SonOff SNZB-02
(eWeLink/TH01). Note that you (may) need to press the button on the
thermometer just after requesting the command (it's a sleepy device and
does not wake up often).
(eWeLink/TH01). Note that on some devices you (may) need to press the
button on the thermometer just after requesting the command (it's a sleepy
device and does not wake up often). With a temperature sensor it may be
more appropriate to sure a high temperature rise to force it to report the
temperature and allow ZHA to send the configuration.

After succeeding the configuration, the minimum delay was actually 20s
which is likely the measurement period itself. The changes were reported
Expand Down
4 changes: 3 additions & 1 deletion custom_components/zha_toolkit/zcl_attr.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ async def conf_report_read(
r_conf["type"] = f"0x{rcfg.datatype:02X}"
r_conf["min_interval"] = (rcfg.min_interval,)
r_conf["max_interval"] = (rcfg.max_interval,)
# r_conf["reportable_change"] = rcfg.reportable_change,
r_conf["reportable_change"] = (
getattr(rcfg, "reportable_change", None),
)
except Exception as e: # nosec
LOGGER.error(
"Issue when reading AttributesReportingConfig"
Expand Down

0 comments on commit c38b741

Please sign in to comment.