Skip to content

Commit

Permalink
Clean up, add test
Browse files Browse the repository at this point in the history
  • Loading branch information
prairiesnpr committed Feb 16, 2025
1 parent ab3a9e7 commit 24d39e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/test_tuya_trv.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
zha.DeviceType.THERMOSTAT, # quirk replaces device type with THERMOSTAT
True, # Enusure schedule is turned off
),
(
"_TZE200_ne4pikwm",
"TS0601",
TUYA_TEST_PLAN_V02,
TUYA_SP_V02,
TUYA_SYS_MODE_V02,
None, # test device has specific device type, real one has SMART_PLUG
),
),
)
async def test_handle_get_data(
Expand Down
2 changes: 1 addition & 1 deletion zhaquirks/tuya/tuya_trv.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ async def write_attributes(
dp_id=3,
ep_attribute=TuyaThermostatV2.ep_attribute,
attribute_name=TuyaThermostatV2.AttributeDefs.running_state.name,
converter=lambda x: 0x01 if x else 0x00, # Heat, Idle
converter=lambda x: RunningState.Heat_State_On if not x else RunningState.Idle,
)
.tuya_switch(
dp_id=8,
Expand Down

0 comments on commit 24d39e9

Please sign in to comment.