UI-Lovelace-Minimalist / UI

UI-Lovelace-Minimalist is a "theme" for HomeAssistant
https://ui-lovelace-minimalist.github.io/UI/
Other
1.68k stars 439 forks source link

ulm_translation_off renders 'undefined' #1547

Open dankarization opened 2 weeks ago

dankarization commented 2 weeks ago

Describe the bug I use card_fan and it renders 'undefined' when the fan is off, successfully showing percentage when fan is on.

Full card:

- type: "custom:button-card"
  entity: fan.recuperator_master_bedroom
  template: card_fan
  variables:
    ulm_card_fan_enable_slider: true

To Reproduce Just use this code with any dimmable fan i guess.

Expected behavior For the card to show 'Off'

Screenshots image image

Additional context I've found that card uses 'ulm_translation_off' from 'custom_components\ui_lovelace_minimalist\lovelace\translations\default.yaml', so it should use default off state for any language. I tried a couple of popular languages, and my primary is English, so I guess there's an error with expression itself, but idk which error. For now I fixed it with ulm_translation_off: "[[[ return hass.resources[hass['language']]['state.default.off'] || 'Off'; ]]]" so it will output 'Off' for any language it can't find, but that's more of a workaround than a fix. That's why I am raising this issue.