-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Yandex dimmer YNDX-00530 #9017
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
Yandex dimmer YNDX-00530 #9017
Conversation
reportable lowState for battery modernExtent
YNDX-00530
src/devices/yandex.ts
Outdated
}, | ||
entityCategory: "config", | ||
}), | ||
m.reportAttribute({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not already done with:
m.light({
effect: true,
powerOnBehavior: true,
configureReporting: true,
}),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. The default minimum period in the report is 10 seconds, and here I change it to the minimum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I add reporting parameters for each attribute to m.light, the code will grow. Therefore, I decided to make a universal reporting that can be used in various cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is nicer to put it in m.light
, in this was you don't need to look in multiple places for the config (and also the execution order is not guaranteed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
src/lib/modernExtend.ts
Outdated
endpointNames?: string[]; | ||
ota?: ModernExtend["ota"]; | ||
levelConfig?: {disabledFeatures?: LevelConfigFeatures}; | ||
levelConfigureReporting?: ReportingConfigWithoutAttribute; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
levelConfigureReporting?: ReportingConfigWithoutAttribute; | |
levelReportingConfig?: ReportingConfigWithoutAttribute; |
src/lib/modernExtend.ts
Outdated
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.levelConfigureReporting}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...args.levelConfigureReporting
fails if args.levelConfigureReporting
if null
{attribute: "currentLevel", min: "10_SECONDS", max: "MAX", change: 1, ...args.levelConfigureReporting}, | |
{attribute: "currentLevel", min: "10_SECONDS", max: "MAX", change: 1, ...(args.levelConfigureReporting ?? {})}, |
Thanks! |
No description provided.