https://github.com/eulemitkeule/hass_day_state
Split up the day into predefined states based on time and sun elevation.
https://github.com/eulemitkeule/hass_day_state
custom-integration elevation hacs homeassistant sun time
Last synced: 8 months ago
JSON representation
Split up the day into predefined states based on time and sun elevation.
- Host: GitHub
- URL: https://github.com/eulemitkeule/hass_day_state
- Owner: EuleMitKeule
- License: mit
- Created: 2023-07-08T21:16:57.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-09T17:52:22.000Z (over 2 years ago)
- Last Synced: 2025-01-01T04:50:18.639Z (9 months ago)
- Topics: custom-integration, elevation, hacs, homeassistant, sun, time
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://github.com/hacs/integration)
[](https://github.com/EuleMitKeule/hass_day_state/actions/workflows/quality.yml)# HASS Day State
HASS Day State allows you to create sensor entities in Home Assistant that split up the day into predefined states.
This is useful for creating automations that behave differently based on combinations sun elevation and current time.## Installation
You can install this integration using the custom repository option in [HACS](https://hacs.xyz/).
1. Add the repository URL to the list of custom repositories in HACS
2. Select and install the integration in HACS
3. Restart Home Assistant
4. Configure your entities## Configuration
To create the entities you need to define them in your `configuration.yaml` file.
For a full example of all available options see [examples](examples/configuration.yaml).```yaml
sensor:
- platform: hass_day_state
sensors:
- unique_id: kuche_day_state
friendly_name: Küche Day State
default_state: day
states:
- type: elevation
name: evening
value: 3.5
- type: time
name: night
from: "01:00"
to: "05:30"
```The states will get sorted automatically so that the highest reached state will be selected.
Time states have priority over elevation states.
Elevation values always mean that the current elevation needs to be less than the specified value for the state to be reached.