mirror of
https://github.com/esphome/esphome.git
synced 2026-05-24 18:06:27 +08:00
[bl0940] Fix reference_voltage config ignored in non-legacy mode (#15375)
This commit is contained in:
@@ -126,7 +126,7 @@ def set_reference_values(config):
|
||||
config.setdefault(CONF_POWER_REFERENCE, DEFAULT_BL0940_LEGACY_PREF)
|
||||
config.setdefault(CONF_ENERGY_REFERENCE, DEFAULT_BL0940_LEGACY_EREF)
|
||||
else:
|
||||
vref = config.get(CONF_VOLTAGE_REFERENCE, DEFAULT_BL0940_VREF)
|
||||
vref = config.get(CONF_REFERENCE_VOLTAGE, DEFAULT_BL0940_VREF)
|
||||
r_one = config.get(CONF_RESISTOR_ONE, DEFAULT_BL0940_R1)
|
||||
r_two = config.get(CONF_RESISTOR_TWO, DEFAULT_BL0940_R2)
|
||||
r_shunt = config.get(CONF_RESISTOR_SHUNT, DEFAULT_BL0940_RL)
|
||||
|
||||
Reference in New Issue
Block a user