Skip to content

Commit a95244d

Browse files
committed
fix: LiXee ZLinky: handle empty TIC command list
If the user defines a value for tic_command_whitelist and then clears it, it remains in the configuration as an empty string. An empty string should be the same as no value at all. Before this change, when the string was empty, no attributes were polled. Let's also suggest a Z2M restart in the description, it's the easiest way to restart the poll.
1 parent b80ebbd commit a95244d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/devices/lixee.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,7 +1746,7 @@ function getCurrentConfig(device: Zh.Device, options: KeyValue) {
17461746
}
17471747

17481748
// Filter exposed attributes with user whitelist
1749-
if (options?.tic_command_whitelist != null) {
1749+
if (options?.tic_command_whitelist) {
17501750
// @ts-expect-error ignore
17511751
const tic_commands_str = options.tic_command_whitelist.toUpperCase();
17521752
if (tic_commands_str !== "ALL") {
@@ -1811,7 +1811,7 @@ export const definitions: DefinitionWithExtend[] = [
18111811
),
18121812
e
18131813
.text("tic_command_whitelist", ea.SET)
1814-
.withDescription("List of TIC commands to be exposed (separated by comma). Reconfigure device after change. Default: all"),
1814+
.withDescription("List of TIC commands to be exposed (separated by comma). Requires Z2M restart. Default: all"),
18151815
],
18161816
configure: async (device, coordinatorEndpoint) => {
18171817
const endpoint = device.getEndpoint(1);

0 commit comments

Comments
 (0)