mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Add Tuya reverse_energy_total and total_power sensors (#114801)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
03d8f4162e
commit
1bbfe7854f
@ -345,6 +345,7 @@ class DPCode(StrEnum):
|
||||
TOTAL_FORWARD_ENERGY = "total_forward_energy"
|
||||
TOTAL_TIME = "total_time"
|
||||
TOTAL_PM = "total_pm"
|
||||
TOTAL_POWER = "total_power"
|
||||
TVOC = "tvoc"
|
||||
UPPER_TEMP = "upper_temp"
|
||||
UPPER_TEMP_F = "upper_temp_f"
|
||||
|
@ -696,6 +696,20 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
device_class=SensorDeviceClass.ENERGY,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.REVERSE_ENERGY_TOTAL,
|
||||
translation_key="total_energy",
|
||||
device_class=SensorDeviceClass.ENERGY,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.TOTAL_POWER,
|
||||
translation_key="total_power",
|
||||
device_class=SensorDeviceClass.POWER,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=UnitOfPower.KILO_WATT,
|
||||
subkey="power",
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.PHASE_A,
|
||||
translation_key="phase_a_current",
|
||||
|
Loading…
x
Reference in New Issue
Block a user