mishaaq / sun-card

Lovelace card for sun component - Home Assistant
MIT License
51 stars 10 forks source link

Problem with "humanize" of sunEntity.to_sunset #13

Closed Boscarato closed 4 years ago

Boscarato commented 4 years ago

Hello.

I'm using the card with sun2, moon sensor and the required time_utc sensor as well.

It seems that the "sunEntity.to_sunset.humanize(true)" (line 192 of the card.ts) is using the fallback to english instead of the localized version. I find it quite strange, since the other information related to the daylight is displaying in the correct localized language.

I've tried other languages as well, but it's always using the english fallback.

picture

Unfortunately I'm not sure if this problem is related to this card, the sensor or the humanize-duration itself.

mishaaq commented 4 years ago

Yup. I didn't realised moment.js locales weren't bundled at some point. Good catch.