Skip to content

Commit

Permalink
fix: Fix Home Assistant Invalid state message error when state is t…
Browse files Browse the repository at this point in the history
…oo long
  • Loading branch information
Koenkk committed Sep 20, 2024
1 parent 951bbd3 commit 09527c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/extension/homeassistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ export default class HomeAssistant extends Extension {
name: endpoint ? `${firstExposeTyped.label} ${endpoint}` : firstExposeTyped.label,
// Truncate text if it's too long
// https://github.com/Koenkk/zigbee2mqtt/issues/23199
value_template: `{{ value_json.${firstExposeTyped.property}|default('',True) | truncate(254, True, '', 0) }}`,
value_template: `{{ value_json.${firstExposeTyped.property} | default('',True) | string | truncate(254, True, '', 0) }}`,
enabled_by_default: !settableText,
...LIST_DISCOVERY_LOOKUP[firstExposeTyped.name],
},
Expand Down

0 comments on commit 09527c3

Please sign in to comment.