-
Notifications
You must be signed in to change notification settings - Fork 4k
LiXee ZLinky: fix polling interval + improve option descriptions #10485
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1806,7 +1806,8 @@ export const definitions: DefinitionWithExtend[] = [ | |
| .numeric("measurement_poll_chunk", ea.SET) | ||
| .withValueMin(1) | ||
| .withDescription( | ||
| "During the poll, request multiple exposes to the Zlinky at once for reducing Zigbee network overload. Too much request at once could exceed device limit. Requires Z2M restart. Default: 4", | ||
| "Number of attributes requested from the ZLinky in each poll to reduce Zigbee network load. " + | ||
| "Requesting too many at once may exceed the device's limit and cause read errors. Requires Z2M restart. Default: 4.", | ||
| ), | ||
| e | ||
| .text("tic_command_whitelist", ea.SET) | ||
|
|
@@ -1894,9 +1895,15 @@ export const definitions: DefinitionWithExtend[] = [ | |
| ota: {manufacturerName: "LiXee"}, // TODO: not sure if it's set properly in device | ||
| extend: [ | ||
| m.poll({ | ||
| key: "interval", | ||
| key: "measurement", | ||
| defaultIntervalSeconds: 600, | ||
| option: exposes.options.measurement_poll_interval(), | ||
| option: exposes.options | ||
| .measurement_poll_interval() | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I use
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is fine |
||
| .withDescription( | ||
| "Some attributes do not support reporting and are polled instead. " + | ||
| "The default poll interval for these is 600 seconds. Set to -1 to disable polling. " + | ||
| "Polled attributes are those marked as read-only at https://github.com/fairecasoimeme/Zlinky_TIC/", | ||
| ), | ||
| poll: async (device, options) => { | ||
| const endpoint = device.getEndpoint(1); | ||
| const measurement_poll_chunk = options?.measurement_poll_chunk ? options.measurement_poll_chunk : 4; | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This should stay as is
Uh oh!
There was an error while loading. Please reload this page.
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.
@Koenkk but it doesn't work as-is, the option is called
measurement_poll_intervaland the poll function checks${args.key}_poll_interval, so the key must match the option name.zigbee-herdsman-converters/src/lib/modernExtend.ts
Line 663 in f7323eb
Am I missing something? Before my fix commit, the poll interval was always 600 seconds, no matter the value of
measurement_poll_interval.