From 092bca0d6345555ecaf07e796ccef5537bd5d25a Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 13 Nov 2019 18:49:59 +1100 Subject: [PATCH] Atm90e32 pf fix (#841) * correct set_pf_sensor to set_power_factor_senor * remove junk files added in error * correct sensors.yaml reference to set_reactive_power * Fixes --- esphome/components/atm90e32/sensor.py | 4 ++-- tests/test1.yaml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/esphome/components/atm90e32/sensor.py b/esphome/components/atm90e32/sensor.py index a5d11bbb75..520dfc82ef 100644 --- a/esphome/components/atm90e32/sensor.py +++ b/esphome/components/atm90e32/sensor.py @@ -74,10 +74,10 @@ def to_code(config): cg.add(var.set_power_sensor(i, sens)) if CONF_REACTIVE_POWER in conf: sens = yield sensor.new_sensor(conf[CONF_REACTIVE_POWER]) - cg.add(var.set_react_pow_sensor(i, sens)) + cg.add(var.set_reactive_power_sensor(i, sens)) if CONF_POWER_FACTOR in conf: sens = yield sensor.new_sensor(conf[CONF_POWER_FACTOR]) - cg.add(var.set_pf_sensor(i, sens)) + cg.add(var.set_power_factor_sensor(i, sens)) if CONF_FREQUENCY in config: sens = yield sensor.new_sensor(config[CONF_FREQUENCY]) cg.add(var.set_freq_sensor(sens)) diff --git a/tests/test1.yaml b/tests/test1.yaml index 0905c51efa..e9f8765167 100644 --- a/tests/test1.yaml +++ b/tests/test1.yaml @@ -261,6 +261,10 @@ sensor: name: "EMON CT1 Current" power: name: "EMON Active Power CT1" + reactive_power: + name: "EMON Reactive Power CT1" + power_factor: + name: "EMON Power Factor CT1" gain_voltage: 47660 gain_ct: 12577 phase_b: