Skip to content

Commit

Permalink
Fix warning mode for Bitron AV2010/24A
Browse files Browse the repository at this point in the history
The Bitron AV2010/24A smoke detector behaves not as expected when mode,
level and strobe are set for the warning capability.
When the field order is flipped in the packet structure, the behaviour
is as expected (as far as the options are supported).

Related to Koenkk#2988 and Koenkk/zigbee2mqtt#8310
  • Loading branch information
muellermartin committed Nov 14, 2021
1 parent 5ecd483 commit 6133a15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion converters/toZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ const converters = {

let info;
// https://github.com/Koenkk/zigbee2mqtt/issues/8310 some devices require the info to be reversed.
if (['SIRZB-110', 'SRAC-23B-ZBSR', 'AV2010/29A'].includes(meta.mapped.model)) {
if (['SIRZB-110', 'SRAC-23B-ZBSR', 'AV2010/29A', 'AV2010/24A'].includes(meta.mapped.model)) {
info = (mode[values.mode]) + ((values.strobe ? 1 : 0) << 4) + (level[values.level] << 6);
} else {
info = (mode[values.mode] << 4) + ((values.strobe ? 1 : 0) << 2) + (level[values.level]);
Expand Down

0 comments on commit 6133a15

Please sign in to comment.