From 8f21c76e33fb6e2a521abb35d066fb286c17b4ee Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 27 Jun 2024 15:49:32 +0200 Subject: [PATCH] Use kWh unit for ExportTariff (#302) --- hatasmota/const.py | 1 + hatasmota/sensor.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hatasmota/const.py b/hatasmota/const.py index ca275dd..77790ae 100644 --- a/hatasmota/const.py +++ b/hatasmota/const.py @@ -119,6 +119,7 @@ SENSOR_ECO2: Final = "eCO2" SENSOR_ENERGY_EXPORT_ACTIVE: Final = "ExportActive" SENSOR_ENERGY_EXPORT_REACTIVE: Final = "ExportReactive" +SENSOR_ENERGY_EXPORT_TARIFF: Final = "ExportTariff" SENSOR_ENERGY_IMPORT_ACTIVE: Final = "ImportActive" SENSOR_ENERGY_IMPORT_REACTIVE: Final = "ImportReactive" SENSOR_ENERGY_IMPORT_TODAY: Final = "Today" diff --git a/hatasmota/sensor.py b/hatasmota/sensor.py index f7b62d4..e16f471 100644 --- a/hatasmota/sensor.py +++ b/hatasmota/sensor.py @@ -46,6 +46,7 @@ SENSOR_ENERGY, SENSOR_ENERGY_EXPORT_ACTIVE, SENSOR_ENERGY_EXPORT_REACTIVE, + SENSOR_ENERGY_EXPORT_TARIFF, SENSOR_ENERGY_IMPORT_ACTIVE, SENSOR_ENERGY_IMPORT_REACTIVE, SENSOR_ENERGY_IMPORT_TODAY, @@ -170,6 +171,7 @@ SENSOR_ENERGY: ENERGY_KILO_WATT_HOUR, SENSOR_ENERGY_EXPORT_ACTIVE: ENERGY_KILO_WATT_HOUR, SENSOR_ENERGY_EXPORT_REACTIVE: REACTIVE_ENERGY_KILO_VOLT_AMPERE_HOUR, + SENSOR_ENERGY_EXPORT_TARIFF: ENERGY_KILO_WATT_HOUR, SENSOR_ENERGY_IMPORT_ACTIVE: ENERGY_KILO_WATT_HOUR, SENSOR_ENERGY_IMPORT_REACTIVE: REACTIVE_ENERGY_KILO_VOLT_AMPERE_HOUR, SENSOR_ENERGY_IMPORT_TODAY: ENERGY_KILO_WATT_HOUR,