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

Translate State #407

Open
FTeinz opened this issue Nov 15, 2023 · 1 comment
Open

Translate State #407

FTeinz opened this issue Nov 15, 2023 · 1 comment

Comments

@FTeinz
Copy link

FTeinz commented Nov 15, 2023

Hello. I want do translate the state of the hvac_action in my Widget. My Thermostat has "off" and "heating". therefore I use this snippet:

  - id: state
    label: Aktion
    template: '{{hvac_action|translate(''state_attributes.climate.hvac_action.'')}}'

But the state is still shown as ofo and heating I want An or AUS. Whats wrong in my code and how I can do that. I also tried:

- id: state
  label: Aktion
  template: >
    {{ 'AUS' if state.text == 'off' else 'AN' }}

Thanks

@RobertoCravallo
Copy link

Hi,
I also would like to have german text for the state. But how?

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

No branches or pull requests

2 participants