Skip to content

Commit

Permalink
Adjust Auto Configure category wkf
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou committed Oct 21, 2023
1 parent f02edec commit 0e3727a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
8 changes: 4 additions & 4 deletions custom_components/localtuya/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@
HVACMode.HEAT: "manual",
HVACMode.AUTO: "auto",
},
"Manual/Auto": {
HVACMode.HEAT: "Manual",
HVACMode.AUTO: "Auto",
},
"Manual/Program": {
HVACMode.HEAT: "Manual",
HVACMode.AUTO: "Program",
Expand Down Expand Up @@ -100,6 +96,10 @@
HVACAction.HEATING: "open",
HVACAction.IDLE: "close",
},
"opened/closed": {
HVACAction.HEATING: "opened",
HVACAction.IDLE: "closed",
},
"heating/no_heating": {
HVACAction.HEATING: "heating",
HVACAction.IDLE: "no_heating",
Expand Down
23 changes: 19 additions & 4 deletions custom_components/localtuya/core/tuya_devices/climates.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,23 @@ def localtuya_climate(
),
)
),
# Thermostatic Radiator Valve
# Not documented
"wkf": (
LocalTuyaEntity(
id=(DPCode.SWITCH, DPCode.MODE),
target_temperature_dp=(DPCode.TEMP_SET_F, DPCode.TEMP_SET),
current_temperature_dp=DPCode.TEMP_CURRENT,
hvac_mode_dp=DPCode.MODE,
hvac_action_dp=(DPCode.WORK_STATE, DPCode.WORK_MODE, DPCode.WORK_STATUS),
custom_configs=localtuya_climate(
hvac_mode_set="manual/auto",
temp_step=1,
actions_set="opened/closed",
unit=UNIT_C,
values_precsion=1,
target_precision=1,
),
)
),
}

# Thermostatic Radiator Valve
# Not documented
CLIMATES["wkf"] = CLIMATES["kt"]
2 changes: 1 addition & 1 deletion custom_components/localtuya/core/tuya_devices/switches.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@
entity_category=EntityCategory.CONFIG,
),
LocalTuyaEntity(
id=DPCode.WINDOW_CHECK,
id=(DPCode.WINDOW_CHECK, DPCode.WINDOW_STATE),
name="Open Window Detection",
icon="mdi:window-open",
entity_category=EntityCategory.CONFIG,
Expand Down

0 comments on commit 0e3727a

Please sign in to comment.