Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ulm_translation_off renders 'undefined' #1547

Open
dankarization opened this issue Nov 2, 2024 · 0 comments
Open

ulm_translation_off renders 'undefined' #1547

dankarization opened this issue Nov 2, 2024 · 0 comments
Labels

Comments

@dankarization
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant