GithubHelp home page GithubHelp logo

Comments (10)

LiJu09 avatar LiJu09 commented on May 31, 2024 4

Graph like this looks great. It's from app Trail Sense.
But there isn't moon entity in Home Assistant.

3

from home-assistant-sun-card.

AitorDB avatar AitorDB commented on May 31, 2024 2

But the moon can be out at the same time than the sun, for example here the moonrise is at 14:06. Also in that way it would be difficult to represent the moon phase in a way that looks good enough

from home-assistant-sun-card.

Misiu avatar Misiu commented on May 31, 2024 2

@AitorDB astral v3.0 supports this. so if new version is added to HA this will be possible to add.

from home-assistant-sun-card.

rct avatar rct commented on May 31, 2024 1

I'd love see the moon rise/set times and elevation too, but unfortunately it is currently a gap in Home Assistant integrations.

I've been pulling moon information from my weather integration, but that's kind of kludgy to try to integrate in a general way.

The Python Astral package, https://pypi.org/project/astral/, which I believe is used by both the builtin Sun sensor and pnbruckner's much improved ha-sun2 sensor only calculates moon phase. So a new library or some work on astral would be needed.

from home-assistant-sun-card.

AitorDB avatar AitorDB commented on May 31, 2024

I have seen this request on Reddit too, I'm bit on the fence with this (whether it should be another card or not), the reasons for it are the needs of probably a new graph, new integration, etc.

from home-assistant-sun-card.

rphlwnk avatar rphlwnk commented on May 31, 2024

How about just adding a second object as the Moon behind the sun, and this object will appear as soon the sun hits the Horizon? Currently the sun is disappearing on the Horizon, so this might be an easy first solution for this.

Something like that - red is the "rising" Moon:
image

from home-assistant-sun-card.

AitorDB avatar AitorDB commented on May 31, 2024

@LiJu09 there's a moon integration, however it seems to only showthe current state of it (new moon, full moon, etc.) and not very used, "it's used by 3.7% of the active installations"

from home-assistant-sun-card.

ChristophHoltmann avatar ChristophHoltmann commented on May 31, 2024

Ok I understand the problem here.

Not sure if it is possible, but there might be a way to calculate the moon rise.

https://boards.straightdope.com/t/algorithm-to-calculate-sun-moon-rise-set-with-example/236751/13

I had no time to do the math yet, but if there are others interested in it, it might be worth it.

from home-assistant-sun-card.

rct avatar rct commented on May 31, 2024

There is an old, open pull request against Astral to add next new moon and next full moon. Looks like it was created by someone trying to get support into Home Assistant.

PyEphem can do calculations for the moon and many other celestial bodies. It isn't currently used in Home Assistant.

from home-assistant-sun-card.

Misiu avatar Misiu commented on May 31, 2024

@AitorDB there is a TypeScript package from the author of Astral: https://github.com/sffjunkie/astral-ts
maybe this can be used to add the moon to the graph (probably with an option to show only the sun, only the moon, or both).
The view from @LiJu09 would be awesome 👍

from home-assistant-sun-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.