Skip to content

Commit c2f64fd

Browse files
authored
Fix Tuya temp sensors _TZE200_vvmbj46n, _TZE284_vvmbj46n (#4037)
* Fix Tuya temp sensors `_TZE200_vvmbj46n`, `_TZE284_vvmbj46n` * Adjust test to expect correct negative numbers * Enable both Tuya spells
1 parent d34ae41 commit c2f64fd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/test_tuya_sensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
("_TZE200_eanjj2pa", "TS0601", 100, 10, False),
4545
("_TZE200_ydrdfkim", "TS0601", 100, 10, False),
4646
("_TZE284_locansqn", "TS0601", 100, 10, False),
47-
("_TZE200_vvmbj46n", "TS0601", 100, 10, True),
47+
("_TZE200_vvmbj46n", "TS0601", 100, 10, False),
4848
],
4949
)
5050
async def test_handle_get_data(

zhaquirks/tuya/tuya_sensor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ class NoManufTimeTuyaMCUCluster(TuyaMCUCluster):
7676
.applies_to("_TZE200_qyflbnbj", "TS0601")
7777
.applies_to("_TZE284_qyflbnbj", "TS0601")
7878
.applies_to("_TZE200_44af8vyi", "TS0601")
79-
.applies_to("_TZE200_vvmbj46n", "TS0601")
80-
.applies_to("_TZE284_vvmbj46n", "TS0601")
8179
# Not using tuya_temperature because device reports negative values incorrectly
8280
.tuya_dp(
8381
dp_id=1,
@@ -120,6 +118,8 @@ class NoManufTimeTuyaMCUCluster(TuyaMCUCluster):
120118
.applies_to("_TZE200_ydrdfkim", "TS0601")
121119
.applies_to("_TZE284_locansqn", "TS0601")
122120
.applies_to("_TZE200_w6n8jeuu", "TS0601")
121+
.applies_to("_TZE200_vvmbj46n", "TS0601")
122+
.applies_to("_TZE284_vvmbj46n", "TS0601")
123123
.tuya_temperature(dp_id=1, scale=10)
124124
.tuya_humidity(dp_id=2)
125125
.tuya_battery(dp_id=4)
@@ -250,6 +250,7 @@ class NoManufTimeTuyaMCUCluster(TuyaMCUCluster):
250250
translation_key="humidity_sensitivity",
251251
fallback_name="Humidity sensitivity",
252252
)
253+
.tuya_enchantment(data_query_spell=True)
253254
.skip_configuration()
254255
.add_to_registry(replacement_cluster=NoManufTimeTuyaMCUCluster)
255256
)

0 commit comments

Comments
 (0)