Skip to content

Commit

Permalink
fix: Fix Avatto ZWT198 _TZE204_xnbkhhdr, fix reversed 6-1 and 5-2 in …
Browse files Browse the repository at this point in the history
…'working_day' datapoint (#8066)

Problem: the 6-1 and 5-2 option is reserved with _TZE204_xnbkhhdr.

Fix the reserved working_day options for Avatto (Tuya) ZWT198 _TZE204_xnbkhhdr. It use the same method as _TZE204_lzriup1j.
  • Loading branch information
B3WiN authored Oct 3, 2024
1 parent 92eaea4 commit c8b28a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6553,10 +6553,10 @@ const definitions: DefinitionWithExtend[] = [
'working_day',
tuya.valueConverterBasic.lookup((_, device) => {
// https://github.com/Koenkk/zigbee2mqtt/issues/23979
if (device.manufacturerName === '_TZE204_lzriup1j') {
return {disabled: tuya.enum(0), '6-1': tuya.enum(2), '5-2': tuya.enum(1), '7': tuya.enum(3)};
} else {
if (device.manufacturerName === '_TZE200_viy9ihs7') {
return {disabled: tuya.enum(0), '6-1': tuya.enum(1), '5-2': tuya.enum(2), '7': tuya.enum(3)};
} else {
return {disabled: tuya.enum(0), '6-1': tuya.enum(2), '5-2': tuya.enum(1), '7': tuya.enum(3)};
}
}),
],
Expand Down

0 comments on commit c8b28a1

Please sign in to comment.