-
Notifications
You must be signed in to change notification settings - Fork 36
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
Calculation and graph overhaul + Moon support #56
Conversation
Here is a built version for those who wish to test this but can't build it themselves (needs to be installed manually in HASS): |
Looking for brave souls who'd review/test this: @edwardtfn, @ThomDietrich, anyone! |
Thank you for you work! |
@HepoH3, thanks, looks good! Check out the |
Moon fields looking good too (but I needed about five minutes to figure out that I'm missing The - type: custom:horizon-card
moon: true
fields:
moonrise: true
moonset: true
moon_phase: true
# now: input_datetime.test_date I think there should be an example of full card config. |
@JasringStw the position makes sense to me, as "afnemende maan" is the actual moon phase, i.e. state rather than title!? However, because of that the text color would need to be black rather than gray @avataar ? |
Works great but I have one request which was from the older card as well. Could the English translations be in title case? I was wondering if an option like Either way, I could create a PR once this is merged or maybe this PR could be updated with it. 😁 |
It looks perfect in Hungarian, but the moon phase text is not visible here. Though it's strange that I can't see it either in English or Dutch :) I put in the following configuration:
|
Thank you all for testing! I just pushed some fixes based on your comments:
I also removed the New zip with the changes: lovelace-horizon-card.zip @wwwescape, let's keep the title case thing for the near future after this is merged. |
Thank you very much for your work. Indeed, the moon integration was not enabled. Now the colors and texts are perfect! |
@avataar No problem. I can wait. Thanks for all the work! |
We may not need the title case option after all! I managed to get the titles and values title cased by styling them using lovelace-card-mod:
|
What needs to happen now for us to proceed? Or is there perhaps an issue? (I'm just asking out of curiosity :) ) |
I've addressed all issues that were reported here + a fix for the recently opened issue #58 related to a new TZ setting in HA 2023.7. Other than someone brave looking at the code there is nothing that prevents us from merging this :) |
suncalc3/README-HORIZON-CARD.md
Outdated
@@ -0,0 +1,25 @@ | |||
# Local copy of suncalc3 | |||
|
|||
This is a copy of module suncalc3 v2.0.5 with some minor modifications that bypass its wrong assumptions about time zones. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like an extreme step. Did you raise those wrong assumptions, do you see a path to remove this local copy at a later state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"its incorrect assumptions", or "imprecise", sounds better than "wrong". 😉
"some minor modifications to improve its time zone handling."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThomDietrich, extreme or not it was very necessary. When I find the time I might submit a PR to the original project but I really needed it to work in an "improved" way :)
@edwardtfn, wrong is wrong whether you call it that or "incorrect". But I get your point so I changed it to "improve its time zone handling".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work!
@edwardtfn would you like to leave a review? This is an amazing addition to the project and I am more than happy to support its merge. @avataar please proceed with the merge, tagging, versioning and release notes as you see fit :) |
|
||
- Home Assistant reports the time of the next occurring Sun event. For example, if you look at the card during the day, the time for sunrise will reflect tomorrow's sunrise and not the one that occurred on the same day. | ||
### Caveats | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"... followed by (!)
", right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot! Fixed.
- Completely revamped calculations and Sun graph, now way more realistic - Moon support: Moon on the graph, moonrise, moonset, Moon phase, Moon elevation and Moon azimuth - Obeys Home Assistant's settings for time and number formatting - Cleaned up config options - Font size adjustments, including the smaller AM/PM text from the original card - Lots of tests - All lint warnings gone Resolves the following issues: - #11 - Moon support - #30 - Horizon-card customize with card-mod - #40 - More realistic visualization and own source of Sun data - #54 - 24h format not working by default - #58 - Support HA 2023.7's local/server time zone setting
601ab84
to
dc9971b
Compare
Summary of changes:
Resolves the following issues:
Thanks to @MiisaTrAnCe, @lcnittl, @edwardtfn, @4l4R1, @HydrelioxGitHub, @v1k70rk4, @lcnittl, @JasringStw, @tjorim, @HepoH3 and @v1k70rk4 for helping with translations for the new moonrise/moonset labels.
Note that I've also translated all existing languages where a contribution for the new labels was missing and I used Google Translate, plain old Google, Wikipedia, common sense and my own nerdiness for languages but some things might still be slightly off. I also corrected the sunrise/sunset labels for Malay as they were the labels for dusk/dawn instead (and I coincidentally learned that "matahari" means Sun in Malay and that's where Mata Hari got her stage name from!).