2022.5 fixes

This commit is contained in:
2022-05-06 19:06:50 +03:00
parent a4e42f0e5a
commit d26a11111d
4 changed files with 19 additions and 12 deletions
@@ -3,7 +3,8 @@ v3_button_purifier:
state_display: |
[[[
if (entity.state === 'off') { return 'Off'; }
return entity.attributes.speed.charAt(0).toUpperCase() + entity.attributes.speed.slice(1);
if (!entity.attributes.preset_mode) { return 'Unknown preset'; }
return entity.attributes.preset_mode.charAt(0).toUpperCase() + entity.attributes.preset_mode.slice(1);
]]]
variables:
value_has_error: |