Skip to content

Commit

Permalink
Detect _TZE200_9yapgbuv as TuYa TS0601_temperature_humidity_sensor_2
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed May 29, 2023
1 parent 30b2a9b commit 1409e99
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions src/devices/tuya.js
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ module.exports = [
{modelID: 'TS0601', manufacturerName: '_TZE200_vs0skpuc'},
{modelID: 'TS0601', manufacturerName: '_TZE200_9yapgbuv'},
{modelID: 'TS0601', manufacturerName: '_TZE200_zl1kmjqx'}],
model: 'TS0601_temperature_humidity_sensor',
model: 'TS0601_temperature_humidity_sensor_1',
vendor: 'TuYa',
description: 'Temperature & humidity sensor',
fromZigbee: [fz.legacy.tuya_temperature_humidity_sensor],
Expand All @@ -1053,6 +1053,28 @@ module.exports = [
return exps;
},
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_yjjdcqsq', '_TZE200_9yapgbuv']),
model: 'TS0601_temperature_humidity_sensor_2',
vendor: 'TuYa',
description: 'Temperature and humidity sensor',
fromZigbee: [tuya.fz.datapoints, tuya.fz.gateway_connection_status],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
exposes: [e.temperature(), e.humidity(), tuya.exposes.batteryState(), e.battery_low()],
meta: {
tuyaDatapoints: [
[1, 'temperature', tuya.valueConverter.divideBy10],
[2, 'humidity', tuya.valueConverter.raw],
[3, 'battery_state', tuya.valueConverter.batteryState],
// [9, 'temperature_unit', tuya.valueConverter.raw], This DP is not properly supported by the device
],
},
whiteLabel: [
tuya.whitelabel('TuYa', 'ZTH01', 'Temperature and humidity sensor', ['_TZE200_yjjdcqsq']),
tuya.whitelabel('TuYa', 'ZTH02', 'Temperature and humidity sensor', ['_TZE200_9yapgbuv']),
],
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_nvups4nh']),
model: 'TS0601_contact_temperature_humidity_sensor',
Expand Down Expand Up @@ -2144,24 +2166,6 @@ module.exports = [
toZigbee: [],
exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
},
{
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_yjjdcqsq']),
model: 'ZTH01',
vendor: 'TuYa',
description: 'Temperature and humidity sensor',
fromZigbee: [tuya.fz.datapoints, tuya.fz.gateway_connection_status],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
exposes: [e.temperature(), e.humidity(), tuya.exposes.batteryState(), e.battery_low()],
meta: {
tuyaDatapoints: [
[1, 'temperature', tuya.valueConverter.divideBy10],
[2, 'humidity', tuya.valueConverter.raw],
[3, 'battery_state', tuya.valueConverter.batteryState],
// [9, 'temperature_unit', tuya.valueConverter.raw], This DP is not properly supported by the device
],
},
},
{
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_3zofvcaa'}],
model: 'TS011F_2_gang_2_usb_wall',
Expand Down

0 comments on commit 1409e99

Please sign in to comment.