Skip to content
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

moon support #11

Closed
leonardpitzu opened this issue Mar 17, 2023 · 23 comments
Closed

moon support #11

leonardpitzu opened this issue Mar 17, 2023 · 23 comments
Assignees
Milestone

Comments

@leonardpitzu
Copy link

How about adding support for the moon?

@ThomDietrich
Copy link

ThomDietrich commented Mar 17, 2023

Previously discussed in AitorDB#144 by @Danieldiazi @modul8 @Tom-ahawk @Tontze

I would love to support this. The mechanics etc are very similar. Maybe another color styling would be appropriate. The biggest issue is that home assistant does not have a native moon.moon entity. I wonder why that is -.-

All and @selfish: Wdyt, would the name "lovelace-sun-card" still be fitting in this case? We could rename the project at this point of its young life. Feels like a nice touch that the successor to the "Sun Card" would be called "Sun Moon Card"

@selfish
Copy link

selfish commented Mar 18, 2023

That's an interesting idea; let's investigate it. I can look into it next week. After a quick glance at the moon integration, it doesn't seem to provide rise/set times; only the moon phase. How could we support the moon's position? Any ideas?

@Tom-ahawk
Copy link

Tom-ahawk commented Mar 18, 2023

Using the AstroWeather integration you will get these sensors:

image

Or this API:
https://ipgeolocation.io/documentation/astronomy-api.html

  - platform: rest
    resource: https://api.ipgeolocation.io/astronomy
    name: Moon API
    unique_id: Moon_API
    scan_interval: 300
    params:
      apiKey: !secret ipgeolocation_api
      city: Home_city
      country: Home_country
    json_attributes: 
      - date
      - current_time
      - moonrise
      - moonset
      - moon_status
      - moon_altitude
      - moon_distance
      - moon_azimuth
      - moon_parallactic_angle
    value_template: >
       {% if value_json.moon_altitude > 0 %}
         up
       {% else %}
         down
       {% endif %}
    icon: >
      {{ state_attr('binary_sensor.sun2_sun_is_up', 'icon') }}

image

@leonardpitzu
Copy link
Author

leonardpitzu commented Mar 19, 2023 via email

@JasringStw
Copy link

I would love to see the moon in the same card with a different color. looking forward to see your developments on this.

@selfish
Copy link

selfish commented Mar 20, 2023

@ThomDietrich @avataar We have several options for adding optional support for the moon. I'd love to see this happen. I think we can go ahead and rename.

@avataar
Copy link
Collaborator

avataar commented Mar 20, 2023

It's a good idea but let's not jump ahead with renaming things just yet. I'd first like to see the project stable and released before we decide on the bright future :)

@ThomDietrich
Copy link

ThomDietrich commented Mar 20, 2023

All, please hold your horses :)

The only thing we need to discuss and decide ASAP is, whether we want to rename the project BEFORE publishing to HACS. Options:

  1. "Sun Card" - the name many are used to from the parent project. I believe it wouldn't be totally illogical to add moon support, ISS support, Jupiter support, ... but it will surprise new users.
  2. "Sun Moon Card" or similar - The name includes "Moon", but is limited to it. I honestly wonder if anyone is interested in other celestial objects?
  3. "Astrology Card", "Sky Card", "Sun+X Card" or similar - Anticipate sun, and all further support. I am not in favor of ditching the known "Sun Card" name but happy to hear name suggestions.

Update: Let's timebox this decision till Tuesday evening 🚀

@tjorim
Copy link

tjorim commented Mar 20, 2023

I was thinking of other stuff that also could refer to more than just the sun:

  • dashboard-daybreak-card
  • dashboard-horizon-card
  • dashboard-atmosphere-card
  • dashboard-sky-card
  • dashboard-star-card

@avataar
Copy link
Collaborator

avataar commented Mar 21, 2023

  1. "Sun Card" - the name many are used to from the parent project. I believe it wouldn't be totally illogical to add moon support, ISS support, Jupiter support, ... but it will surprise new users.

Since this is what the card currently does, it's the most fitting and it's a drop in replacement for the original project, i.e. having "custom:sun-card" in your existing dashboard will continue to work.

  1. "Sun Moon Card" or similar - The name includes "Moon", but is limited to it. I honestly wonder if anyone is interested in other celestial objects?

Since we still don't have moon support, the name doesn't fit. I don't believe other celestial objects are needed either.

  1. "Astrology Card", "Sky Card", "Sun+X Card" or similar - Anticipate sun, and all further support. I am not in favor of ditching the known "Sun Card" name but happy to hear name suggestions.

"Sky Card" is a good fit if we really want to reserve the opportunity to add something other than the Sun in the future.

"Horizon Card" (based on @tjorim's suggestions) sounds good too.

Regarding the name of the repository, I think "lovelace-xxx-card" is better than "dashboard-xxx-card" as "lovelace" is a very specific term that refers to HA unambiguously while "dashboard" is very generic, but I have no strong opinion on that one.

@JasringStw
Copy link

I love the horizon-card option, leaves all options open for further developments.

@ThomDietrich
Copy link

The name lovelace-horizon-card is certainly quite neat.

Let's have the community decide:

  • React with 🎉 if you support the name lovelace-horizon-card -> "Horizon Card"
  • React with 🚀 if you prefer to stay with the established name lovelace-sun-card -> "Sun Card", while we would still add moon support, which would be slightly illogical but not a dealbreaker

@edwardtfn
Copy link
Collaborator

3. Astrology Card

This card is not related to "Astrology", which is mainly considered a pseudoscience nowadays.
This card is about "Astronomy", which is a science studying the universe outside our planet.
😉

@edwardtfn
Copy link
Collaborator

"Sky card" would have my vote. 😜
Or "Astro card".

@ThomDietrich
Copy link

@edwardtfn you caught me off guard there. I feel ashamed that I've mixed terms known from clown culture and science 🙈

The majority has spoken :) We have a winner.

@lcnittl
Copy link

lcnittl commented Mar 31, 2023

Nooo -- I tuned in too late! Would have voted for lovelace-luminary-card or lovelace-luminaries-card.

@ThomDietrich
Copy link

@lcnittl
Copy link

lcnittl commented Mar 31, 2023

@ThomDietrich absolutely!

It is a (slightly older, probably) term for (shining) celestial/heavenly bodies.

From https://en.wikipedia.org/wiki/Luminary

Luminary
A celestial body, as the sun or moon or an object that gives light; or, a person of eminence or brilliant achievement. From Old French luminarie or late Latin luminarium, from Latin lumen, lumin- "light".

From https://en.wiktionary.org/wiki/luminary#Noun

luminary (plural luminaries)
[...]
2) (archaic) A body that gives light; especially, one of the heavenly bodies.
[...]

But also some more famous dictionaries mention it, like Merriam-Webster and Collins.

So a nice collective term for both sun and moon (and others).

@jazzyisj
Copy link

jazzyisj commented Apr 1, 2023

Love the idea of moon support. I currently stack my horizon card with an entities card with a moon phase template entity that has a dynamic image icon for the moon phase. It would be cool to see something like this integrated right into the horizon card.

image

@avataar
Copy link
Collaborator

avataar commented Apr 17, 2023

Here is a preview of the upcoming Moon support (different locations and times):

screencapture-localhost-8123-new-horizon-default-view-2023-04-16-21_32_30

What is the new Moon stuff:

  • Showing the Moon as it moves above and below the horizon visually matching what you'd see at your location/time
  • Support for showing the azimuth and elevation - I believe it's best if shown together with those of the Sun, with the appropriate astronomical symbols. If only the azimuth/elevation of one of the bodies is configured to be shown, no symbol will be displayed.
  • Support for showing moonrise, moonset and moon phase. The phase will be rotated to approximately match your latitude but that can be overridden via config option.

This is how it looks with different fields shown/hidden:

screencapture-localhost-8123-horizon-options-default-view-2023-04-16-21_44_19

There are other non-moon related changes, see #40 for details.

@avataar avataar self-assigned this Apr 17, 2023
@avataar
Copy link
Collaborator

avataar commented Apr 17, 2023

Request for help with translations:

I've created a Google sheet to gather translations for "moonrise" and "moonset": https://docs.google.com/spreadsheets/d/19CETx--HXXTW0NzyivpMcmqT7VBGOR_HTt27i5XsR7U/edit?usp=sharing. Add a translation in as many languages as you feel confident in.

@edwardtfn
Copy link
Collaborator

A celestial body, as the sun or moon or an object that gives light;

It's a bit questionable call the Moon as an object that "gives light", no? 😜
If you say the Moon gives light you have to say that any visible object gives light.

@avataar
Copy link
Collaborator

avataar commented Jul 4, 2023

Last teaser but I just had to share. It feels really good when the Moon is exactly where the Horizon card says it should be :) Local time 2:17.

moon-horizon

Coming out soon!

avataar added a commit that referenced this issue Jul 5, 2023
- 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
avataar added a commit that referenced this issue Jul 13, 2023
- 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
avataar added a commit that referenced this issue Jul 13, 2023
- 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
@avataar avataar added this to the 1.0.0 milestone Jul 13, 2023
@avataar avataar closed this as completed Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants