github pnbruckner/ha-sun2 3.3.0b0
Add elevation option for observer obstruction vs horizon

latest releases: 3.3.3, 3.3.2, 3.3.1...
pre-release6 months ago

The astral package this integration uses can accept two different types of data for certain events like sunrise & sunset to describe where these events are seen relative to the observer.

The first, which has been the only supported option so far, is the horizon. In this case, the elevation of the observer relative to ground level defines how much to adjust the event by due to the curvature of the Earth.

The second is an obstruction, such as the top of a mountain. This is defined by the horizontal distance to the obstruction, and the height of the obstruction relative to the observer (both expressed in meters), which can be negative if the obstruction is lower than the observer (e.g., the observer is on an even higher mountain.)

This PR adds support for defining either type for easterly events (sunrise, dawn) and westerly events (sunset, dusk.)

NOTE: The documentation has not yet been updated to describe how to use this new feature from YAML configuration. Using it from UI configuration is obviously much easier. If you do want to try it from YAML, here is an example:

sun2:
  - unique_id: home
    observer_elevation:
      above_ground: 0
      sunrise_obstruction:
        distance: 50000
        relative_height: 2000

The old elevation config option has been deprecated by observer_elevation. It is still supported, however, in case you want to go back to a previous version of this integration. These options are no longer "coupled" with the location options (latitude, etc.)

Don't miss a new ha-sun2 release

NewReleases is sending notifications on new releases.