From 36ce32be8421ef446b66664f396d3261c6fce3d4 Mon Sep 17 00:00:00 2001 From: vwt12eh8 <63479906+vwt12eh8@users.noreply.github.com> Date: Wed, 3 Aug 2022 06:38:39 +0900 Subject: [PATCH] Fix AC input entity (#27) --- custom_components/ecoflow/sensor.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/custom_components/ecoflow/sensor.py b/custom_components/ecoflow/sensor.py index a7ee2b2..63c1ed8 100644 --- a/custom_components/ecoflow/sensor.py +++ b/custom_components/ecoflow/sensor.py @@ -50,8 +50,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e "ac_out_voltage", "AC output voltage"), WattsEntity(client, client.pd, "in_power", "Total input"), WattsEntity(client, client.pd, "out_power", "Total output"), - WattsEntity(client, client.inverter, - "ac_in_power", "AC input", real=0), WattsEntity(client, client.inverter, "ac_consumption", "AC output + loss", real=True), WattsEntity(client, client.inverter, "ac_out_power", @@ -92,6 +90,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e "USB-C right temperature"), VoltageEntity(client, client.mppt, "dc_in_voltage", "DC input voltage"), + WattsEntity(client, client.inverter, + "ac_in_power", "AC input"), WattsEntity(client, client.mppt, "dc_in_power", "DC input", real=True), WattsEntity(client, client.mppt, @@ -162,8 +162,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e VoltageEntity(client, client.inverter, "dc_in_voltage", "DC input voltage"), WattsEntity(client, client.pd, "car_out_power", "Car output"), - WattsEntity(client, client.inverter, - "dc_in_power", "DC input", real=True), WattsEntity(client, client.pd, "light_power", "Light output"), WattsEntity(client, client.pd, "usbqc_out1_power", "USB-Fast output"),