HLW8012: add "never" option to change_mode_every (#3473)

This commit is contained in:
Yorick Smilda 2023-12-20 11:52:59 +01:00 committed by GitHub
parent 2544de1052
commit 2b2c0e2259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,8 @@ Advanced Options:
Possible values are ``HLW8012``, ``CSE7759``, ``BL0937``. Defaults to ``HLW8012``.
CSE7759 uses same constants and it also works with default. Must be set for BL0937 to be able to calibrate all three measurements at the same time.
- **change_mode_every** (*Optional*, int): After how many updates to cycle between the current/voltage measurement mode.
Note that the first value after switching is discarded because it is often inaccurate. Defaults to ``8``.
Note that the first value after switching is discarded because it is often inaccurate. When set to ``"never"`` the measurement mode will stay at the
set ``initial_mode``. Defaults to ``8``.
- **initial_mode** (*Optional*, string): The initial measurement mode. Defaults to ``VOLTAGE``.
Possible initial measurement modes are ``VOLTAGE`` or ``CURRENT``.
@ -97,7 +98,7 @@ the initial measurement mode to match whichever mode the device uses, and disabl
name: "HLW8012 Power"
update_interval: 60s
initial_mode: CURRENT
change_mode_every: 4294967295
change_mode_every: "never"
SEL Pin Inversion
-----------------