This integration provides a sensor that determines the current time block based on Slovenian energy pricing periods. It takes into account:
- High season (November-February) and low season (March-October)
- Workdays and non-workdays (including weekends and holidays)
- Slovenian national holidays (including Easter-dependent holidays)
- Open HACS in your Home Assistant instance
- Click on Integrations
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add this repository URL and select "Integration" as the category
- Click "Add"
- Search for "URO SI TimeBlock" in HACS
- Click "Download"
- Restart Home Assistant
- Copy the
custom_components/uro_si_timeblock
directory to your Home Assistant'scustom_components
directory - Restart Home Assistant
Add the following to your configuration.yaml
:
sensor:
- platform: uro_si_timeblock
The sensor will be created as sensor.uro_si_timeblock
with the following attributes:
state
: Current block number (1-5)is_workday
: Whether current day is a workdayis_high_season
: Whether current month is in high seasoncurrent_time
: Current time in decimal formatmonth
: Current monthhour
: Current hourminute
: Current minute
The sensor determines the current block (1-5) based on:
- Season (high/low)
- Day type (workday/non-workday)
- Time of day
For example, in high season on workdays:
- Block 1: 7:00-14:00 and 16:00-20:00
- Block 2: 6:00-7:00, 14:00-16:00, and 20:00-22:00
- Block 3: 0:00-6:00 and 22:00-24:00
See the full schedule in the code documentation.
Feel free to contribute to this project by opening issues or pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.