Skip to content

Commit

Permalink
fix(detect): Detect _TZE204_qyflbnbj as Tuya TS0601_temperature_hum…
Browse files Browse the repository at this point in the history
…idity_sensor_1 (#8358)
  • Loading branch information
bugale authored Nov 22, 2024
1 parent c4919b7 commit 1ca3d57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,7 @@ const definitions: DefinitionWithExtend[] = [
{modelID: 'TS0601', manufacturerName: '_TZE200_vs0skpuc'},
{modelID: 'TS0601', manufacturerName: '_TZE200_44af8vyi'},
{modelID: 'TS0601', manufacturerName: '_TZE200_zl1kmjqx'},
{modelID: 'TS0601', manufacturerName: '_TZE204_qyflbnbj'},
],
model: 'TS0601_temperature_humidity_sensor_1',
vendor: 'Tuya',
Expand All @@ -1036,7 +1037,7 @@ const definitions: DefinitionWithExtend[] = [
toZigbee: [],
exposes: (device, options) => {
const exps: Expose[] = [e.temperature(), e.humidity(), e.battery()];
if (!device || device.manufacturerName === '_TZE200_qyflbnbj') {
if (!device || device.manufacturerName === '_TZE200_qyflbnbj' || device.manufacturerName === '_TZE204_qyflbnbj') {
exps.push(e.battery_low());
exps.push(e.enum('battery_level', ea.STATE, ['low', 'middle', 'high']).withDescription('Battery level state'));
}
Expand Down

0 comments on commit 1ca3d57

Please sign in to comment.