mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +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_FORWARD_ENERGY = "total_forward_energy"
|
||||||
TOTAL_TIME = "total_time"
|
TOTAL_TIME = "total_time"
|
||||||
TOTAL_PM = "total_pm"
|
TOTAL_PM = "total_pm"
|
||||||
|
TOTAL_POWER = "total_power"
|
||||||
TVOC = "tvoc"
|
TVOC = "tvoc"
|
||||||
UPPER_TEMP = "upper_temp"
|
UPPER_TEMP = "upper_temp"
|
||||||
UPPER_TEMP_F = "upper_temp_f"
|
UPPER_TEMP_F = "upper_temp_f"
|
||||||
|
@ -696,6 +696,20 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
|||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
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(
|
TuyaSensorEntityDescription(
|
||||||
key=DPCode.PHASE_A,
|
key=DPCode.PHASE_A,
|
||||||
translation_key="phase_a_current",
|
translation_key="phase_a_current",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user