Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Namron 3802968 & tz.warning_simple fix #5225

Merged
merged 3 commits into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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},
},
];