Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions homeassistant/components/tuya/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,7 @@ class DPCode(StrEnum):
UP_DOWN = "up_down"
UPPER_TEMP = "upper_temp"
UPPER_TEMP_F = "upper_temp_f"
USE_TIME_ONE = "use_time_one"
UV = "uv" # UV sterilization
UV_INDEX = "uv_index"
UV_RUNTIME = "uv_runtime" # UV runtime
Expand Down Expand Up @@ -979,6 +980,7 @@ class DPCode(StrEnum):
WIRELESS_ELECTRICITY = "wireless_electricity"
WORK_MODE = "work_mode" # Working mode
WORK_POWER = "work_power"
WORK_STATE = "work_state"
WORK_STATE_E = "work_state_e"


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/tuya/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
),
),
DeviceCategory.SFKZQ: (
# Controls the irrigation duration for the water valve
# Controls the irrigation duration for indexed water valves
NumberEntityDescription(
key=DPCode.COUNTDOWN_1,
translation_key="indexed_irrigation_duration",
Expand Down
11 changes: 11 additions & 0 deletions homeassistant/components/tuya/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,17 @@ class TuyaSensorEntityDescription(SensorEntityDescription):
state_class=SensorStateClass.TOTAL_INCREASING,
entity_category=EntityCategory.DIAGNOSTIC,
),
TuyaSensorEntityDescription(
key=DPCode.USE_TIME_ONE,
translation_key="last_watering_time",
device_class=SensorDeviceClass.DURATION,
entity_category=EntityCategory.DIAGNOSTIC,
),
TuyaSensorEntityDescription(
key=DPCode.WORK_STATE,
translation_key="irrigation_status",
entity_category=EntityCategory.DIAGNOSTIC,
),
*BATTERY_SENSORS,
),
DeviceCategory.SGBJ: BATTERY_SENSORS,
Expand Down
11 changes: 11 additions & 0 deletions homeassistant/components/tuya/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -706,12 +706,23 @@
"inverter_output_power": {
"name": "Inverter output power"
},
"irrigation_status": {
"name": "Status",
"state": {
"auto": "[%key:common::state::auto%]",
"idle": "[%key:common::state::idle%]",
"manual": "[%key:common::state::manual%]"
}
},
"last_amount": {
"name": "Last amount"
},
"last_operation_duration": {
"name": "Last operation duration"
},
"last_watering_time": {
"name": "Last watering time"
},
"lifetime_battery_charge_energy": {
"name": "Lifetime battery charge energy"
},
Expand Down
Loading
Loading