kalkih / simple-weather-card

Minimalistic weather card for Home Assistant
MIT License
283 stars 33 forks source link

After HA 2023.4 update, Weather attribute issue #67

Closed limitless00net closed 1 year ago

limitless00net commented 1 year ago

After HA 2023.4 update, Weather attribute is displayed in lowercase letters and no spaces.

20230414_184

wimb0 commented 1 year ago

I am having the same issue since HA 2023.4 image

Smandurlo commented 1 year ago

Same here. There is another problem: it is not translated. I had the weather attribute in Italian, now it is in English. It happened to both my HA installations

Fruitsmart commented 1 year ago

The same here. it is not translate to german.

se-bastiaan commented 1 year ago

This is caused by changes in HA frontend: https://github.com/home-assistant/frontend/pull/15820/files

The translation key needs to be adjusted here: https://github.com/kalkih/simple-weather-card/blob/master/src/weather.js#L80

Probably also need backwards compatibility though and I do not know how to do that

edwardtich1 commented 1 year ago

how to set it up?

niekniek89 commented 1 year ago

Here the same issue, nog translation. is it possible to change this yourself to:

simple-weather-card-bundle.js

or will there be an update?

se-bastiaan commented 1 year ago

Yes you can definitely change the key in your local bundled JS file. Here is an adjusted version: https://gist.github.com/se-bastiaan/93b481797c141a3e5868fc57bd2124ef

limitless00net commented 1 year ago

@kalkih Please merge this pull requests: https://github.com/kalkih/simple-weather-card/pull/68

edwardtich1 commented 1 year ago

Да, вы определенно можете изменить ключ в случайно связанном JS-файле. https://gist.github.com/se-bastiaan/93b481797c141a3e5868fc57bd2124ef

what needs to be changed here?

edwardtich1 commented 1 year ago

Это вызывает изменениями в интерфейсе HA: https://github.com/home-assistant/frontend/pull/15820/files.

Здесь необходимо настроить ключ перевода: https://github.com/kalkih/simple-weather-card/blob/master/src/weather.js#L80 .

Возможно, также нужна обратная совместимость, но я не знаю, как это сделать.

I don't have such a file

kalkih commented 1 year ago

https://github.com/kalkih/simple-weather-card/pull/68 now merged, let me know if issue is resolved with the altest version!

wimb0 commented 1 year ago

Installed the update, v0.8.4. Doesn't work correctly. The card does not show.

Code:

Uncaught (in promise) ReferenceError: useComponentEntityTranslations is not defined
    get state simple-weather-card-bundle.js:1
    value simple-weather-card-bundle.js:1
    value simple-weather-card-bundle.js:1
    update lit-element.ts:160
    performUpdate reactive-element.ts:1331
    scheduleUpdate reactive-element.ts:1263
    _$Ej reactive-element.ts:1235

Picture: image

Checked versions and modified date, and they are up to date. update: Same issue in Android App, Firefox and Edge.

kalkih commented 1 year ago

Thanks, I see the issue. I will put up a new version tomorrow, way past 🛌-time now.

edwardtich1 commented 1 year ago

updated version it is not translated

limitless00net commented 1 year ago

Thanks, I see the issue. I will put up a new version tomorrow, way past 🛌-time now.

I wonder whether you put up a new version again.

kalkih commented 1 year ago

Sorry, new version is up now https://github.com/kalkih/simple-weather-card/releases/tag/v0.8.5 I do no longer run HA myself so unable to test stuff and did unfortunately miss the issue while reviewing the PR.

Smandurlo commented 1 year ago

It works :-) Screenshot_2023-05-12-23-01-10-783_io homeassistant companion android-edit

edwardtich1 commented 1 year ago

updated version it is not translated

Smandurlo commented 1 year ago

Are you sure? Mine is ok Screenshot_2023-05-13-10-53-41-274_io homeassistant companion android-edit

edwardtich1 commented 1 year ago

it is not translated

Smandurlo commented 1 year ago

it is not translated

What is your HA version?

edwardtich1 commented 1 year ago

Home Assistant 2023.5.2 Supervisor 2023.04.1 Operating System 10.1

Smandurlo commented 1 year ago

I have 2 HA and both are fixed. I use openweather map and istituto Portuguese do mar as weather forecast services, if that makes any difference

edwardtich1 commented 1 year ago

AccuWeather, Inc. Forecast Met.no Not working

Mariusthvdb commented 7 months ago

sorry for following up this closed issue, but please could anyone let me know if the wind direction should be translated?

I use Dutch, and can see the condition in Dutch alright, but the direction is still using SW, while in Dutch this should be ZW

Scherm­afbeelding 2024-01-14 om 15 03 41
se-bastiaan commented 7 months ago

@Mariusthvdb It's SW instead of ZW for me too. The shown values are hard-coded though, so they're not going to change based on your UI language.

It should be possible to translate it though: https://github.com/home-assistant/frontend/blob/7c389a6cf0e925325c90d8948a9fb7dc7f070bb5/src/data/weather.ts#L198C7-L200C8

Mariusthvdb commented 7 months ago

sure, thanks, I did have a look at that, would be easy enough. would be much better though if it supported translations via localize like the modern frontend does not sure if this card is still maintained.