A modern Home Assistant custom integration that creates a dynamic device and sensor ecosystem to automatically track and cycle through custom day modes (Morning, Day, Evening, Night, Away) based on a personalized weekday schedule matrix, zone occupancy, and automated vacation sensing.
To add this integration, please add the custom repository [https://github.com/ticstyle/Day-Modes](https://github.com/ticstyle/Day-Modes) to HACS in your Home Assistant setup.
The integration natively defaults to English for backend operations but includes full frontend translations for Swedish. Thanks to native State Translations, state values will display localized text (e.g., Morgon, Dag, Borta, Semesterläge) seamlessly in your UI while preserving standard raw values for backend tracking.
- Device-Centric Architecture: Instead of creating loose, disconnected entities, the integration generates a clean Day modes Device container grouping all relevant cycle state and configuration data together.
- 📅 Matrix Weekday Scheduling: Configure unique time schedules for different days (e.g., separate weekday and weekend routines, or individual custom schedules for every single day) via a clean, unified flow.
- 🌴 Smart Vacation Mode & Time Delay: Delay your Morning mode transition to a dedicated late-start time when you want a sleep-in. Fully automates via an optional Home Assistant calendar tracking system with native support for manual dashboard overrides.
- 🔄 Dynamic Calendar Sensors: Exposes dedicated configuration entities that automatically adjust their states to show today's active time boundaries, making dashboard presentation effortless.
- 👥 Dynamic Presence Tracking: Automatically forces an
awaystate whenever your designated home zone becomes empty, and instantly restores the correct time-based operational mode the second someone returns. - ⚙️ On-the-Fly Reconfiguration: Built with a recursive multi-step Options Flow. Easily adjust your scheduled times, regroup weekdays, change your vacation calendar, or target a completely different zone at any point via the UI cogwheel.
- 100% Async Engine: Uses Home Assistant's event-driven architecture to subscribe to precise state and time changes, ensuring zero unnecessary CPU polling cycles.
Via HACS or manually copy the day_modes folder from the latest release to the custom_components folder inside your Home Assistant configuration directory.
Add the integration via the Home Assistant User Interface. Go to Settings -> Devices & Services -> Add Integration and search for Day modes.
During setup, you will select the active days for your baseline profile and optionally select an existing Home Assistant calendar to drive your vacation tracking. Any days left unselected will automatically cascade into custom follow-up setup steps until your entire week matrix is fully mapped.
Once configured, the integration automatically registers a device named Day modes containing the following 8 entities:
| Entity ID | Name in UI | State Example | Description |
|---|---|---|---|
sensor.day_modes |
Current mode | day (Dag) |
Core operational state tracking. Returns morning, day, evening, night, or away. |
sensor.day_modes_morning_time |
Morning start time | 06:00 |
Displays the active start time threshold for Morning mode today (dynamically shifts if vacation mode is active). |
sensor.day_modes_day_time |
Day start time | 09:00 |
Displays the active start time threshold for Day mode today. |
sensor.day_modes_evening_time |
Evening start time | 20:00 |
Displays the active start time threshold for Evening mode today. |
sensor.day_modes_night_time |
Night start time | 23:00 |
Displays the active start time threshold for Night mode today. |
sensor.day_modes_vacation_calendar |
Vacation calendar | calendar.personal |
Displays the name of the tracked calendar or Not Configured. |
switch.day_modes_vacation_mode |
Vacation mode | on (På) |
Controls whether the vacation mode time override is currently active. |
time.day_modes_vacation_morning_time |
Vacation morning time | 08:00 |
An editable time selector to dynamically set your preferred vacation sleep-in time right from the UI. |
The core state sensor (sensor.day_modes) explicitly exposes your entire configuration layout matrix within its metadata attributes:
tracked_zone: The target zone entity being monitored (e.g.,zone.home).schedules: A structured list containing all your configured profiles, including the assigned days and specific time variables for each group.
Because all setup parameters for the current day are first-class entities, building a quick status layout is dead simple and no longer requires nested attribute lookups:
type: markdown
title: "House Status"
content: >
Current House Mode: **{{ states('sensor.day_modes') }}**
{% if is_state('sensor.day_modes', 'away') %}
🏠 The house is currently in eco-mode while everyone is out.
{% else %}
⏰ Tonight's night mode schedule is set to trigger at {{ states('sensor.day_modes_night_time') }}.
{% endif %}To render a beautiful, clean overview card that automatically displays all your distinct weekly profiles and schedules, use the structured data inside the core sensor attributes:
type: markdown
content: |-
📅 Day Mode Schedules
{% set profiles = state_attr('sensor.day_modes', 'schedules') %}
{% if profiles %}
{% for p in profiles %}
### 🗓️ {{ p.days | join(', ') }}
| 🌅 Morning | **{{ p.morning }}** |
| ☀️ Day | **{{ p.day }}** |
| 🌆 Evening | **{{ p.evening }}** |
| 🌙 Night | **{{ p.night }}** |
{% if not loop.last %}---{% endif %}
{% endfor %}
{% else %}
No schedules configured.
{% endif %}An elegant control station using standard Home Assistant cards to easily manage your holiday sleep-in offsets and keep an eye on automation bindings:
type: entities
title: "🌴 Holiday & Vacation Control"
show_header_toggle: false
entities:
- entity: switch.day_modes_vacation_mode
name: "Activate Vacation Mode"
icon: mdi:airplane
- entity: time.day_modes_vacation_morning_time
name: "Sleep-in Wake Up Time"
- entity: sensor.day_modes_vacation_calendar
name: "Monitored Calendar Source"