Skip to content

Commit

Permalink
feat(detect): Detect _TZE200_mja3fuja as TuYa TS0601_smart_air_hous…
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jun 5, 2023
1 parent 5f31082 commit 994e681
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ const definitions: Definition[] = [
exposes: [e.temperature(), e.humidity(), e.co2(), e.voc().withUnit('ppm'), e.formaldehyd()],
},
{
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_dwcarsat'}],
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_dwcarsat', '_TZE200_mja3fuja']),
model: 'TS0601_smart_air_house_keeper',
vendor: 'TuYa',
description: 'Smart air house keeper',
Expand Down
4 changes: 2 additions & 2 deletions src/lib/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3982,14 +3982,14 @@ const fromZigbee1 = {
return {humidity: utils.calibrateAndPrecisionRoundOptions(value / 10, options, 'humidity')};
// DP22: Smart Air Box: Formaldehyd, Smart Air Housekeeper: co2
case dataPoints.tuyaSabFormaldehyd:
if (['_TZE200_dwcarsat', '_TZE200_ryfmq5rl'].includes(meta.device.manufacturerName)) {
if (['_TZE200_dwcarsat', '_TZE200_ryfmq5rl', '_TZE200_mja3fuja'].includes(meta.device.manufacturerName)) {
return {co2: utils.calibrateAndPrecisionRoundOptions(value, options, 'co2')};
} else {
return {formaldehyd: utils.calibrateAndPrecisionRoundOptions(value, options, 'formaldehyd')};
}
// DP2: Smart Air Box: co2, Smart Air Housekeeper: MP25
case dataPoints.tuyaSabCO2:
if (meta.device.manufacturerName === '_TZE200_dwcarsat') {
if (['_TZE200_mja3fuja', '_TZE200_dwcarsat'].includes(meta.device.manufacturerName)) {
// Ignore: https://github.com/Koenkk/zigbee2mqtt/issues/11033#issuecomment-1109808552
if (value === 0xaaac || value === 0xaaab) return;
return {pm25: utils.calibrateAndPrecisionRoundOptions(value, options, 'pm25')};
Expand Down

0 comments on commit 994e681

Please sign in to comment.