Skip to content

Commit

Permalink
Fix Develco SMSZB-120 alarm with 4.0.5 firmware and add 3802968 (#5225)
Browse files Browse the repository at this point in the history
* Added support for Namron 3802968 LED Filament Flex 5W CCT E27 Clear

* Fixed broken warning_simple for SMSZB-120 fw => 4.0.5

* Removed value.duration as it was not used
  • Loading branch information
TheStigh committed Dec 30, 2022
1 parent 5a97675 commit 1feb5bf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
12 changes: 10 additions & 2 deletions converters/toZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,16 @@ const converters = {
warning_simple: {
key: ['alarm'],
convertSet: async (entity, key, value, meta) => {
const alarmState = (value === 'OFF' ? 0 : 1);
const info = (3 << 6) + ((alarmState) << 2);
const alarmState = (value === 'alarm' || value === 'OFF' ? 0 : 1);

let info;
// For Develco SMSZB-120, introduced change in fw 4.0.5, tested backward with 4.0.4
if (['SMSZB-120'].includes(meta.mapped.model)) {
info = ((alarmState) << 7) + ((alarmState) << 6);
} else {
info = (3 << 6) + ((alarmState) << 2);
}

await entity.command(
'ssIasWd',
'startWarning',
Expand Down
8 changes: 8 additions & 0 deletions devices/namron.js
Original file line number Diff line number Diff line change
Expand Up @@ -725,4 +725,12 @@ module.exports = [
await reporting.bind(endpoint, coordinatorEndpoint, binds);
},
},
{
zigbeeModel: ['3802968'],
model: '3802968',
vendor: 'Namron',
description: 'LED Filament Flex 5W CCT E27 Clear',
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 555]}),
meta: {turnsOffAtBrightness1: true},
},
];

0 comments on commit 1feb5bf

Please sign in to comment.