hlw8012: add constants by sensor model (#1282)

This commit is contained in:
Adrián Panella 2021-07-04 18:09:16 -05:00 committed by GitHub
parent 1234b08773
commit debf4f775b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -67,6 +67,9 @@ Advanced Options:
Defaults to the Sonoff POW's value ``0.001 ohm``.
- **voltage_divider** (*Optional*, float): The value of the voltage divider on the board as ``(R_upstream + R_downstream) / R_downstream``.
Defaults to the Sonoff POW's value ``2351``.
- **model** (*Optional*, string): The sensor model on the board, to set internal constant factors to convert pulses to measurements.
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``.
- **initial_mode** (*Optional*, string): The initial measurement mode. Defaults to ``VOLTAGE``.