Add support for VESKA-micro-inverter (VK-800) to tuya integration (#115996)

This commit is contained in:
Jan Gaedicke 2024-06-22 11:28:59 +02:00 committed by GitHub
parent 6e15c06aa9
commit 5e71eb4e0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View File

@ -253,6 +253,7 @@ class DPCode(StrEnum):
POWDER_SET = "powder_set" # Powder
POWER = "power"
POWER_GO = "power_go"
POWER_TOTAL = "power_total"
PRESENCE_STATE = "presence_state"
PRESSURE_STATE = "pressure_state"
PRESSURE_VALUE = "pressure_value"
@ -267,6 +268,7 @@ class DPCode(StrEnum):
RESET_FILTER = "reset_filter"
RESET_MAP = "reset_map"
RESET_ROLL_BRUSH = "reset_roll_brush"
REVERSE_ENERGY_TOTAL = "reverse_energy_total"
ROLL_BRUSH = "roll_brush"
SEEK = "seek"
SENSITIVITY = "sensitivity" # Sensitivity

View File

@ -1094,6 +1094,24 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
),
*BATTERY_SENSORS,
),
# VESKA-micro inverter
"znnbq": (
TuyaSensorEntityDescription(
key=DPCode.REVERSE_ENERGY_TOTAL,
translation_key="total_energy",
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
),
TuyaSensorEntityDescription(
key=DPCode.POWER_TOTAL,
translation_key="power",
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfPower.WATT,
suggested_display_precision=0,
suggested_unit_of_measurement=UnitOfPower.WATT,
),
),
}
# Socket (duplicate of `kg`)