mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-28 05:24:29 +00:00
fix: Fix Home Assistant truncate error when program is null. https://github.com/Koenkk/zigbee2mqtt/issues/16460
This commit is contained in:
@@ -885,7 +885,8 @@ export default class HomeAssistant extends Extension {
|
||||
const lookup: {[s: string]: KeyValue} = {
|
||||
action: {icon: 'mdi:gesture-double-tap'},
|
||||
programming_mode: {icon: 'mdi:calendar-clock'},
|
||||
program: {value_template: `{{ value_json.${firstExpose.property} | truncate(254, True, '', 0) }}`},
|
||||
program: {value_template: `{{ value_json.${firstExpose.property}|default("") ` +
|
||||
`| truncate(254, True, '', 0) }}`},
|
||||
};
|
||||
|
||||
const discoveryEntry: DiscoveryEntry = {
|
||||
|
||||
Reference in New Issue
Block a user