Last active
April 11, 2024 10:19
-
-
Save c-kick/fa17b4e3ec474f4169dd8fa1e59e5d49 to your computer and use it in GitHub Desktop.
This package is a required part of the HNL HASS pabkage blueprint: https://gist.github.com/c-kick/2d252ec6faca02ec84a9e4a3c2e34f4f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This package is a required part of the HNL HASS package blueprint: https://gist.github.com/c-kick/2d252ec6faca02ec84a9e4a3c2e34f4f | |
input_boolean: | |
# -------------------------------------------- Primary states | |
primary_state_home: | |
name: "Thuis" | |
icon: mdi:home-account | |
primary_state_sleep: | |
name: "Slapen" | |
icon: mdi:bed | |
# -------------------------------------------- Secondary states | |
secondary_state_holiday: | |
name: "Vakantiedag" | |
icon: mdi:umbrella-beach | |
secondary_state_dusk: | |
name: "Schemering" | |
icon: mdi:weather-sunset | |
secondary_state_guest_mode: | |
name: "Guest-mode" | |
icon: mdi:account-plus | |
secondary_state_away_long: | |
name: "Lang weg" | |
icon: mdi:home-export-outline | |
# -------------------------------------------- Helper booleans | |
helper_activity: | |
name: "Activity" | |
icon: mdi:motion-sensor | |
activity_triggered: | |
name: "Activity continous trigger" | |
icon: mdi:account-eye | |
helper_high_alert: | |
name: "High alert" | |
icon: mdi:exclamation-thick | |
# -------------------------------------------- Daily resetting next-day-state helper booleans | |
helper_next_day_as_weekend: | |
name: "Morgen als weekend" | |
icon: mdi:home-account | |
helper_next_day_restore_away_long: | |
name: "Morgen weer thuis" | |
icon: mdi:home-import-outline | |
template: | |
# -------------------------------------------- Helper buttons (single triggers) | |
input_button: | |
helper_activity_trigger: | |
name: "Activity single trigger" | |
icon: mdi:account-eye | |
# -------------------------------------------- Helper numbers | |
input_number: | |
helper_trigger_delay: | |
name: "Inschakeldelay" | |
icon: mdi:progress-clock | |
unit_of_measurement: min | |
initial: 0 | |
step: 1 | |
min: 0 | |
max: 60 | |
helper_restore_delay: | |
name: "Uitschakeldelay" | |
icon: mdi:clock-time-eight | |
unit_of_measurement: min | |
initial: 15 | |
step: 1 | |
min: 0 | |
max: 60 | |
# -------------------------------------------- Helper timers | |
timer: | |
helper_activity_delay_timer: | |
name: Activity switching delay timer | |
duration: "00:15:00" | |
restore: true | |
icon: mdi:timer-alert | |
helper_activity_trigger_timer: | |
name: Activity trigger easing timer | |
duration: "00:01:30" | |
restore: true | |
icon: mdi:timer-refresh-outline | |
# -------------------------------------------- Automations for internal logic | |
automation: | |
- alias: "! HNL-HASS - Evaluate long away" | |
description: >- | |
Evalueert de primary_state_home, en als secondary_state_away_long aanstaat, | |
wordt deze uitgeschakeld zodra primary_state_home aan gaat. Tevens, als secondary_state_away_long aan gaat, | |
wordt primary_state_home uitgeschakeld. | |
id: hnl_hass_evaluate_long_away | |
mode: single | |
trigger: | |
- platform: state | |
entity_id: input_boolean.primary_state_home | |
to: 'on' | |
id: weer_thuis | |
- platform: state | |
entity_id: input_boolean.secondary_state_away_long | |
to: 'on' | |
id: lang_weg | |
condition: [] | |
action: | |
- if: | |
- condition: trigger | |
id: | |
- weer_thuis | |
- condition: state | |
entity_id: input_boolean.secondary_state_away_long | |
state: 'on' | |
then: | |
- service: input_boolean.turn_off | |
target: | |
entity_id: input_boolean.secondary_state_away_long | |
alias: "Unset long away if home" | |
- if: | |
- condition: trigger | |
id: | |
- lang_weg | |
then: | |
- service: input_boolean.turn_off | |
target: | |
entity_id: input_boolean.primary_state_home | |
alias: "Unset home if long away" | |
# -------------------------------------------- Cosmetics | |
homeassistant: | |
customize: | |
automation.hnl_hass_manage_smart_home_basics: | |
icon: mdi:home-automation | |
timer.helper_activity_trigger_timer: | |
icon: mdi:timer-refresh-outline | |
timer.helper_activity_delay_timer: | |
icon: mdi:timer-alert | |
automation.hnl_hass_evaluate_sleep_trigger_and_restore_delays: | |
icon: mdi:list-status | |
automation.hnl_hass_evaluate_long_away: | |
icon: mdi:home-import-outline | |
automation.hnl_hass_activity_trigger_easing: | |
icon: mdi:timer-refresh-outline | |
automation.hnl_hass_evaluate_activity: | |
icon: mdi:call-split |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment