Skip to content
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
45 changes: 45 additions & 0 deletions src/devices/yandex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function YandexCluster(): ModernExtend {
powerType: {ID: 0x0003, type: Zcl.DataType.ENUM8},
ledIndicator: {ID: 0x0005, type: Zcl.DataType.BOOLEAN},
interlock: {ID: 0x0007, type: Zcl.DataType.BOOLEAN},
buttonMode: {ID: 0x0008, type: Zcl.DataType.ENUM8},
},
commands: {
switchMode: {
Expand All @@ -113,6 +114,10 @@ function YandexCluster(): ModernExtend {
ID: 0x07,
parameters: [{name: "value", type: Zcl.DataType.UINT8}],
},
buttonMode: {
ID: 0x08,
parameters: [{name: "value", type: Zcl.DataType.UINT8}],
},
},
commandsResponse: {},
});
Expand Down Expand Up @@ -431,4 +436,44 @@ export const definitions: DefinitionWithExtend[] = [
}),
],
},
{
zigbeeModel: ["YNDX-00530"],
model: "YNDX_00530",
vendor: "Yandex",
description: "Dimmer",
extend: [
YandexCluster(),
m.light({
effect: true,
powerOnBehavior: true,
configureReporting: true,
levelReportingConfig: {min: "MIN", max: "MAX", change: 1},
}),
m.lightingBallast(),
binaryWithSetCommand({
name: "led_indicator",
cluster: "manuSpecificYandex",
attribute: "ledIndicator",
valueOn: ["ON", 1],
valueOff: ["OFF", 0],
setCommand: "ledIndicator",
zigbeeCommandOptions: {manufacturerCode},
description: "Led indicator",
entityCategory: "config",
}),
enumLookupWithSetCommand({
name: "button_mode",
cluster: "manuSpecificYandex",
attribute: "buttonMode",
setCommand: "buttonMode",
zigbeeCommandOptions: {manufacturerCode},
description: "Dimmer button mode",
lookup: {
general: 0x00,
alternative: 0x01,
},
entityCategory: "config",
}),
],
},
];
3 changes: 2 additions & 1 deletion src/lib/modernExtend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,7 @@ export interface LightArgs {
endpointNames?: string[];
ota?: ModernExtend["ota"];
levelConfig?: {disabledFeatures?: LevelConfigFeatures};
levelReportingConfig?: ReportingConfigWithoutAttribute;
}
export function light(args?: LightArgs): ModernExtend {
// biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
Expand Down Expand Up @@ -1087,7 +1088,7 @@ export function light(args?: LightArgs): ModernExtend {
if (args.configureReporting) {
await setupAttributes(device, coordinatorEndpoint, "genOnOff", [{attribute: "onOff", min: "MIN", max: "MAX", change: 1}]);
await setupAttributes(device, coordinatorEndpoint, "genLevelCtrl", [
{attribute: "currentLevel", min: "10_SECONDS", max: "MAX", change: 1},
{attribute: "currentLevel", min: "10_SECONDS", max: "MAX", change: 1, ...(args.levelReportingConfig || {})},
]);
if (args.colorTemp) {
await setupAttributes(device, coordinatorEndpoint, "lightingColorCtrl", [
Expand Down