Skip to content

Commit 7ad51ce

Browse files
authored
fix: Fix Home Assistant Invalid state message error when state is too long (#24045)
1 parent 951bbd3 commit 7ad51ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/extension/homeassistant.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ export default class HomeAssistant extends Extension {
12031203
name: endpoint ? `${firstExposeTyped.label} ${endpoint}` : firstExposeTyped.label,
12041204
// Truncate text if it's too long
12051205
// https://github.com/Koenkk/zigbee2mqtt/issues/23199
1206-
value_template: `{{ value_json.${firstExposeTyped.property}|default('',True) | truncate(254, True, '', 0) }}`,
1206+
value_template: `{{ value_json.${firstExposeTyped.property} | default('',True) | string | truncate(254, True, '', 0) }}`,
12071207
enabled_by_default: !settableText,
12081208
...LIST_DISCOVERY_LOOKUP[firstExposeTyped.name],
12091209
},

0 commit comments

Comments
 (0)