mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 07:08:20 +00:00
Fix HLW8012 Voltage Divider option not being added to source
This commit is contained in:
parent
3b3ff4fea9
commit
b503b8b218
@ -50,6 +50,8 @@ def to_code(config):
|
|||||||
sensor.register_sensor(hlw.make_power_sensor(conf[CONF_NAME]), conf)
|
sensor.register_sensor(hlw.make_power_sensor(conf[CONF_NAME]), conf)
|
||||||
if CONF_CURRENT_RESISTOR in config:
|
if CONF_CURRENT_RESISTOR in config:
|
||||||
add(hlw.set_current_resistor(config[CONF_CURRENT_RESISTOR]))
|
add(hlw.set_current_resistor(config[CONF_CURRENT_RESISTOR]))
|
||||||
|
if CONF_VOLTAGE_DIVIDER in config:
|
||||||
|
add(hlw.set_voltage_divider(config[CONF_VOLTAGE_DIVIDER]))
|
||||||
if CONF_CHANGE_MODE_EVERY in config:
|
if CONF_CHANGE_MODE_EVERY in config:
|
||||||
add(hlw.set_change_mode_every(config[CONF_CHANGE_MODE_EVERY]))
|
add(hlw.set_change_mode_every(config[CONF_CHANGE_MODE_EVERY]))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user