diff --git a/homeassistant/components/tuya/const.py b/homeassistant/components/tuya/const.py index f54b2af36e0..524cd0a4983 100644 --- a/homeassistant/components/tuya/const.py +++ b/homeassistant/components/tuya/const.py @@ -166,6 +166,7 @@ class DPCode(StrEnum): CRY_DETECTION_SWITCH = "cry_detection_switch" CUP_NUMBER = "cup_number" # NUmber of cups CUR_CURRENT = "cur_current" # Actual current + CUR_NEUTRAL = "cur_neutral" # Total reverse energy CUR_POWER = "cur_power" # Actual power CUR_VOLTAGE = "cur_voltage" # Actual voltage DECIBEL_SENSITIVITY = "decibel_sensitivity" @@ -444,7 +445,7 @@ UNITS = ( ), UnitOfMeasurement( unit=UnitOfEnergy.KILO_WATT_HOUR, - aliases={"kwh", "kilowatt-hour", "kW·h"}, + aliases={"kwh", "kilowatt-hour", "kW·h", "kW.h"}, device_classes={SensorDeviceClass.ENERGY}, ), UnitOfMeasurement( diff --git a/homeassistant/components/tuya/sensor.py b/homeassistant/components/tuya/sensor.py index 0937f64d911..1468f90a452 100644 --- a/homeassistant/components/tuya/sensor.py +++ b/homeassistant/components/tuya/sensor.py @@ -778,6 +778,12 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { device_class=SensorDeviceClass.ENERGY, state_class=SensorStateClass.TOTAL_INCREASING, ), + TuyaSensorEntityDescription( + key=DPCode.CUR_NEUTRAL, + translation_key="total_production", + device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, + ), TuyaSensorEntityDescription( key=DPCode.PHASE_A, translation_key="phase_a_current", diff --git a/homeassistant/components/tuya/strings.json b/homeassistant/components/tuya/strings.json index 281d56f7ae4..46530a1d938 100644 --- a/homeassistant/components/tuya/strings.json +++ b/homeassistant/components/tuya/strings.json @@ -517,6 +517,9 @@ "total_energy": { "name": "Total energy" }, + "total_production": { + "name": "Total production" + }, "phase_a_current": { "name": "Phase A current" },