Giter VIP home page Giter VIP logo

Comments (5)

DBuit avatar DBuit commented on August 23, 2024

Where did you find that code?
I use this.hass.localize(component.light.state._.off) to the translation for the off state in the language of the hass instalation IT is running

from light-popup-card.

matt8707 avatar matt8707 commented on August 23, 2024

So I think the localization is working but it happens when sliding to 0%

if(el) {el.innerText = (value == 0) ? "Off" : value + "%";}

  • If I open a popup with a light that is off it says 'Av'
  • Turn it on to 50%
  • Slide it down to 0% and it says 'Off'
  • Reopen the popup and it says 'Av'

from light-popup-card.

DBuit avatar DBuit commented on August 23, 2024

when a light has a brightness of 0% it is automatically off

from light-popup-card.

matt8707 avatar matt8707 commented on August 23, 2024

Yeah, I get that. It's the language used that changed.

from light-popup-card.

schiz0phr3ne avatar schiz0phr3ne commented on August 23, 2024

I agree with @matt8707 :

  • when a light is off, and when I open this card, status is Éteinte (french)
  • when I light up and switch off the light inside the card, status becomes Off
  • when I close this card, and reopen it, status is Éteinte again

So, when the card is opened, and the light switched off, locale is not taken into account.

This is not a big issue, but it would be cool to solve it !

from light-popup-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.