Closed Nakiros closed 6 months ago
I have the same problem with moon phases after the update.
I have the same problem with moon phases after the update...
I have the same problem with moon phases after the update.
Hi same issue and Furthemore, it is in English while the moon phase sensor gives the information in my native French language
The same issue, but problems with Moon are language independent - it is always English only and wrong phase with "(!)" for sure it is HA core 2024.4.x dependent.
Update: the moon phase updated to "new moon" as expected from "waning crescent", so i believe that it connects to the Moon integration, retrevies information from it, but form some unknown reason, it also writes the "(!)"
Additional information: This message appears when you hover over "new_moon (!)": "Install Moon integration to get localized Moon phase name" even though the integration is already installed.
connects to the Moon integration
No, it displayed that much before I installed the Moon integration. It's just the translation that needs the integration.
Hey all, thanks for all the reports. Anyone amongst you brave enough to submit a fixing PR? :)
I don't know how to fix it, just to add that it does not work even if forcing the language with the option instead of relying on the card getting the HA language.
There is a typo in the code. Line 2740:
var moon_phase_localized = i18n.localize("component.sensor.state.moon__phase.".concat(phase.state));
Double underscore in entity name
There is a typo in the code. Line 2740:
var moon_phase_localized = i18n.localize("component.sensor.state.moon__phase.".concat(phase.state));
Double underscore in entity name
...but fixing that does not solve the issue...
I took a look at the moon source strings.json and it appears that line 2740 needs to be
var moon_phase_localized = i18n.localize("component.moon.entity.sensor.phase.state.".concat(phase.state));
Making that change fixed it for me
It could be that my "fix" is a fluke that only works for English (not a js guy and no idea how the localisation class works). Do make sure that you don't have a cached lovelace-horizon-card.js in your browser though. I had to clear the cache and reload that file.
I should add that I had to edit the gz file. That seems to be the one that is served
@rmd-gh that worked for me too - even when I switched language to Polish
By the way, you can remove the gz
file when editing, it's simply a compressed version to speed up loading but the script loads just fine without it.
Perhaps PR it?
It could be that my "fix" is a fluke that only works for English (not a js guy and no idea how the localisation class works). Do make sure that you don't have a cached lovelace-horizon-card.js in your browser though. I had to clear the cache and reload that file.
Cache cleared and reloaded the page. Not working for me (in Dutch).
var moon_phase_localized = i18n.localize("component.moon.entity.sensor.phase.state.".concat(phase.state));
works for me in Spanish, just by reloading the page, modifying .js and removing .gz
I took a look at the moon source strings.json and it appears that line 2740 needs to be
var moon_phase_localized = i18n.localize("component.moon.entity.sensor.phase.state.".concat(phase.state));
Making that change fixed it for me
thank you so much!
Fixed it too! Thx @rmd-gh !
Whoever publishes the PR gets mentioned in the release notes! :)
If anyone wants to do a PR, feel free. I don't know enough about building typescript to test, or using github to do that. The actual source location appears to be lovelace-horizon-card/src/utils/HelperFunctions.ts:32
I took a look at the moon source strings.json and it appears that line 2740 needs to be
var moon_phase_localized = i18n.localize("component.moon.entity.sensor.phase.state.".concat(phase.state));
Making that change fixed it for me
Thanks so much, it also worked for the Italian version !
@nepozs has already created a pull request
https://github.com/rejuvenate/lovelace-horizon-card/pull/127 👍
I took a look at the moon source strings.json and it appears that line 2740 needs to be
var moon_phase_localized = i18n.localize("component.moon.entity.sensor.phase.state.".concat(phase.state));
Making that change fixed it for meThanks so much, it also worked for the Italian version !
My settings are PL in general apart from language which is EN. The solution is working fine. I only had to convince ;) my browser to refresh the settings effectively. A restart of the core was insufficient. Neither was a common F5 or CTRL+F5. Cleaning the browser cache of past two hours was what only helped.
It is just worth noting I think, in another browser that I did not use to use for HA, just after I logged in, there was no exclamation mark at all.
I took a look at the moon source strings.json and it appears that line 2740 needs to be
var moon_phase_localized = i18n.localize("component.moon.entity.sensor.phase.state.".concat(phase.state));
Making that change fixed it for meThanks so much, it also worked for the Italian version !
I've try to do this fix, but for me not working in Italian language
I took a look at the moon source strings.json and it appears that line 2740 needs to be
var moon_phase_localized = i18n.localize("component.moon.entity.sensor.phase.state.".concat(phase.state));
Making that change fixed it for meThanks so much, it also worked for the Italian version !
Can you help me @maatx for italian language?
Can you help me @maatx for italian language?
This issue is language independent, clear cache in browser.
I've try to crear cache of browser and the app Homeassistant, but not working
From: nepozs @.> Sent: Wednesday, April 17, 2024 10:08:53 PM To: rejuvenate/lovelace-horizon-card @.> Cc: Bilo2110 @.>; Comment @.> Subject: Re: [rejuvenate/lovelace-horizon-card] Moon phase integration not recognized after 2024.4 update (Issue #122)
Can you help me @maatxhttps://github.com/maatx for italian language?
This issue is language independent, clear cache in browser.
— Reply to this email directly, view it on GitHubhttps://github.com/rejuvenate/lovelace-horizon-card/issues/122#issuecomment-2062133158, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA6FD6KFCSLX4KJNKKWBQ33Y53JFLAVCNFSM6AAAAABFWS5YFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRSGEZTGMJVHA. You are receiving this because you commented.Message ID: @.***>
Have you tried in secure/private mode? Or on another computer/laptop/phone?
Maybe italian translation is incomplete? Does Moon integration work OK?
Have you tried in secure/private mode? Or on another computer/laptop/phone?
I've try whit private mode in Chrome by smartphone, but same problem
Maybe italian translation is incomplete? Does Moon integration work OK?
Moon integration work, and give me correct italian translation. Not work in this card. I've tried to add new card... Same problem
Perhaps, if not yet attempted, you could try with changing the language for a while with
language: en
or setting the least config
type: custom:horizon-card
fields:
moon_phase: true
followed each time by restarting the Core and browser cache/history cleaning (or private mode).
Wait wait wait... After deleting the .gz file, edit line 2740, cleared cache, finally WORK!!! Thx for all
From: jm314159 @.> Sent: Wednesday, April 17, 2024 10:51:12 PM To: rejuvenate/lovelace-horizon-card @.> Cc: Bilo2110 @.>; Comment @.> Subject: Re: [rejuvenate/lovelace-horizon-card] Moon phase integration not recognized after 2024.4 update (Issue #122)
Perhaps, if not yet attempted, you could try with changing the language for a while with language: en or setting the least config
type: custom:horizon-card fields: moon_phase: true
followed each time by restarting the Core and browser cache/history cleaning (or private mode).
— Reply to this email directly, view it on GitHubhttps://github.com/rejuvenate/lovelace-horizon-card/issues/122#issuecomment-2062282215, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA6FD6MGTN3WAJFO4HHGGXDY53OEBAVCNFSM6AAAAABFWS5YFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRSGI4DEMRRGU. You are receiving this because you commented.Message ID: @.***>
Well, indeed, I forgot that step in my first message. I have also recreated .gz
gzip lovelace-horizon-card.js -k
Congrats to you! :)
Hello everyone, sadly I didn't have the time to merge this one yet (or rather other PRs I want to publish alongside this fix). Will take care of it this evening!
Hey all, I did merge the PR but sadly our build release pipeline isn't happy with it. Could you @nepozs or someone else please look into this? I am not a js/ts developer.
https://github.com/rejuvenate/lovelace-horizon-card/actions/runs/8807266271
Nor I am… sorry, looks it needs more changes…
Hacs give me update from v1.0.0 to v1.0.0.. is possible?
From: nepozs @.> Sent: Wednesday, April 24, 2024 2:46:45 AM To: rejuvenate/lovelace-horizon-card @.> Cc: Bilo2110 @.>; Comment @.> Subject: Re: [rejuvenate/lovelace-horizon-card] Moon phase integration not recognized after 2024.4 update (Issue #122)
Nor I am… sorry, looks it needs more changes…
— Reply to this email directly, view it on GitHubhttps://github.com/rejuvenate/lovelace-horizon-card/issues/122#issuecomment-2073739165, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA6FD6JMWDG2MUNCTKSES73Y636HLAVCNFSM6AAAAABFWS5YFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZTG4ZTSMJWGU. You are receiving this because you commented.Message ID: @.***>
Wait wait wait... After deleting the .gz file, edit line 2740, cleared cache, finally WORK!!! Thx for all … ____ From: jm314159 @.> Sent: Wednesday, April 17, 2024 10:51:12 PM To: rejuvenate/lovelace-horizon-card @.> Cc: Bilo2110 @.>; Comment @.> Subject: Re: [rejuvenate/lovelace-horizon-card] Moon phase integration not recognized after 2024.4 update (Issue #122) Perhaps, if not yet attempted, you could try with changing the language for a while with language: en or setting the least config type: custom:horizon-card fields: moon_phase: true followed each time by restarting the Core and browser cache/history cleaning (or private mode). — Reply to this email directly, view it on GitHub<#122 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA6FD6MGTN3WAJFO4HHGGXDY53OEBAVCNFSM6AAAAABFWS5YFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRSGI4DEMRRGU. You are receiving this because you commented.Message ID: @.***>
Same in German. After editing line 2740 and delete *.gz it work now. Thank you guys
@avataar @edwardtfn are you guys around to have a look at this?
For me the fix do not work.
I need this as entity: component.moon.entity.sensor.phase.state
. Then everything is working. The fix without "moon" is not working. I saw also some test issue with the persia language tests. I ignore them for the first time. Maybe someone who speak the lang should add tests for that :-).
I had some trouble with the build pipeline. My changes were not taken into the release.
https://github.com/rejuvenate/lovelace-horizon-card/pull/131
Quick fix using Card Mod without modifying files (English only):
type: custom:horizon-card
time_format: 24
fields:
moonrise: true
moon_phase: true
moonset: true
card_mod:
style: |
.horizon-card-field-value-moon-phase span {display: none;}
.horizon-card-field-value-moon-phase:before {content: "{{states('sensor.moon_phase')|replace('_',' ')|title}}";}
Quick fix with modifying file (incl. localized) from terminal/ssh:
cd config/www/community/lovelace-horizon-card/
sed -i 's/component.sensor.state.moon__phase./component.moon.entity.sensor.phase.state./g' lovelace-horizon-card.js
rm -f lovelace-horizon-card.js.gz && gzip lovelace-horizon-card.js -k
ha core restart
Clear your browser cache and reload afterwards!
I already fixed it, PR is still open.
Meanwhile you could try it with my repo. It's released here: https://github.com/MelleD/lovelace-horizon-card
Looking forward to the PR that fixes this being merged.
Dear all, this bug is now fixed in the most recent release https://github.com/rejuvenate/lovelace-horizon-card/releases/tag/v1.1.0 - there are a lot more changes in that release.
This repository is hosted under the rejuvenate organization. We are always open to new contributions and happy for anyone participating in discussions and the review process! If you are a passionate js/ts developer and would like to be more involved with this project please also check the open feature suggestions ;)
Cheers!
After 2024.4 update, "(!)" appeared next to moon phase. I reinstalled Moon integration, I reinstalled Horizon card, did HA restart several times, and the "(!)" still won't go away.