Gæstetilstand, lys/gardin-justeringer, varme-standardværdier og vanding
- Gæstetilstand: ny gaester.yaml, udvidet guest_mode og guest_automations_off; lys_stue, gardiner m.fl. respekterer input_boolean.gaester - Varme: nye standardværdier (komfort stue/andreas/daniel, bryggers/køkken 23, nat-/væk-sænkning) - Nye filer: garage_anne_evening.yaml, input/boolean/vanding.yaml - Diverse justeringer af lys-, ferie- og vandingsautomationer samt dashboards - HA-version og mealie.json opdateret Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
7493149d03
commit
bf4395c441
23 files changed
+315
-41
No files matched your search
@@ -31,7 +31,10 @@
|
||||
- variables:
|
||||
lights: >
|
||||
{% set base = ['light.indkorsel_2', 'light.garage'] %}
|
||||
{% if now().isocalendar()[1] >= 42 or now().isocalendar()[1] <= 8 %}
|
||||
{% set baghave_tilladt = not is_state('input_boolean.gaester', 'on')
|
||||
or 9 <= now().hour < 22 %}
|
||||
{% if baghave_tilladt and
|
||||
(now().isocalendar()[1] >= 42 or now().isocalendar()[1] <= 8) %}
|
||||
{{ (base + ['light.extended_color_light_1']) | list }}
|
||||
{% else %}
|
||||
{{ base }}
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
- id: gaester_tilstand_skifter
|
||||
alias: Gæster - tilstand skifter
|
||||
description: >
|
||||
Kobler "Vi har gæster"-knappen (input_boolean.gaester) til scripts der
|
||||
slår gæste-automationer og alarmer fra/til.
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.gaester
|
||||
from: "off"
|
||||
to: "on"
|
||||
id: "on"
|
||||
- platform: state
|
||||
entity_id: input_boolean.gaester
|
||||
from: "on"
|
||||
to: "off"
|
||||
id: "off"
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
id: start
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: script.guest_mode_on
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: "off"
|
||||
sequence:
|
||||
- service: script.guest_mode_off
|
||||
|
||||
- id: gaester_gardiner_morgen
|
||||
alias: Gæster - gardiner ved første bevægelse og helt op kl. 9
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.stue_bevaegelse
|
||||
to: "on"
|
||||
id: motion
|
||||
- platform: time
|
||||
at: "09:00:00"
|
||||
id: open
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: "on"
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: motion
|
||||
- condition: time
|
||||
after: "05:50:00"
|
||||
before: "09:00:00"
|
||||
- condition: state
|
||||
entity_id: input_boolean.first_run
|
||||
state: "off"
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.morgen
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.first_run
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: open
|
||||
sequence:
|
||||
- service: cover.open_cover
|
||||
target:
|
||||
entity_id: cover.alle_gardiner
|
||||
|
||||
- id: gaester_soendag_paamindelse
|
||||
alias: Gæster - spørg søndag kl. 20 om gæstetilstand skal slås fra
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "20:00:00"
|
||||
condition:
|
||||
- condition: time
|
||||
weekday:
|
||||
- sun
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: "on"
|
||||
action:
|
||||
- variables:
|
||||
confirm_action: "{{ 'GUEST_MODE_OFF_' ~ context.id }}"
|
||||
keep_action: "{{ 'GUEST_MODE_KEEP_' ~ context.id }}"
|
||||
- service: notify.mobile_app_claus_iphone_15pro
|
||||
data:
|
||||
title: "Gæstetilstand"
|
||||
message: "Vil du slå gæstetilstand fra nu?"
|
||||
data:
|
||||
tag: gaester_soendag
|
||||
actions:
|
||||
- action: "{{ confirm_action }}"
|
||||
title: "Slå fra"
|
||||
- action: "{{ keep_action }}"
|
||||
title: "Behold gæstetilstand"
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: "{{ confirm_action }}"
|
||||
id: confirmed
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: "{{ keep_action }}"
|
||||
id: keep
|
||||
- platform: state
|
||||
entity_id: input_boolean.gaester
|
||||
to: "off"
|
||||
id: already_off
|
||||
timeout: "04:00:00"
|
||||
continue_on_timeout: true
|
||||
- service: notify.mobile_app_claus_iphone_15pro
|
||||
data:
|
||||
message: clear_notification
|
||||
data:
|
||||
tag: gaester_soendag
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger is not none and wait.trigger.id == 'confirmed' }}"
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: "on"
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.gaester
|
||||
@@ -0,0 +1,60 @@
|
||||
- id: garageport_anne_evening_close
|
||||
alias: Garageport Anne - luk kl. 21 med mulighed for annullering
|
||||
description: >
|
||||
Varsl kl. 21 og luk efter to minutter, medmindre brugeren annullerer
|
||||
eller porten lukkes i mellemtiden. Den eksisterende reminder er uændret.
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "21:00:00"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garageport
|
||||
state: "on"
|
||||
|
||||
action:
|
||||
- service: notify.mobile_app_claus_iphone_15pro
|
||||
data:
|
||||
title: "Garageport"
|
||||
message: "Garageporten er åben og lukkes automatisk om 2 minutter. Tryk Annuller for at lade den stå åben."
|
||||
data:
|
||||
tag: garage_anne_evening_close
|
||||
actions:
|
||||
- action: CANCEL_GARAGE_ANNE_EVENING
|
||||
title: "Annuller"
|
||||
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: CANCEL_GARAGE_ANNE_EVENING
|
||||
id: cancelled
|
||||
- platform: state
|
||||
entity_id: binary_sensor.garageport
|
||||
to: "off"
|
||||
id: closed
|
||||
timeout: "00:02:00"
|
||||
continue_on_timeout: true
|
||||
|
||||
- service: notify.mobile_app_claus_iphone_15pro
|
||||
data:
|
||||
message: clear_notification
|
||||
data:
|
||||
tag: garage_anne_evening_close
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger is not none }}"
|
||||
sequence:
|
||||
- stop: "Aftenlukning annulleret, eller porten er allerede lukket"
|
||||
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garageport
|
||||
state: "on"
|
||||
|
||||
- service: cover.close_cover
|
||||
target:
|
||||
entity_id: cover.anne
|
||||
@@ -3,6 +3,9 @@
|
||||
- platform: time
|
||||
at: '07:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.arbejdsdag
|
||||
state: 'on'
|
||||
@@ -16,6 +19,9 @@
|
||||
- platform: time
|
||||
at: '09:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.arbejdsdag
|
||||
state: 'off'
|
||||
@@ -29,6 +35,9 @@
|
||||
- platform: time
|
||||
at: '06:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.arbejdsdag
|
||||
state: 'on'
|
||||
@@ -42,6 +51,9 @@
|
||||
- platform: time
|
||||
at: '07:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.arbejdsdag
|
||||
state: 'off'
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
to: "off"
|
||||
for:
|
||||
minutes: 2
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: "off"
|
||||
action:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
|
||||
@@ -44,6 +44,12 @@
|
||||
- condition: template
|
||||
value_template: "{{ not is_state('input_select.andreas_status', 'syg') }}"
|
||||
|
||||
# Gæster: ingen motion-lys om natten (22-09)
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ not is_state('input_boolean.gaester', 'on') or
|
||||
900 <= now().strftime('%H%M') | int < 2200 }}
|
||||
|
||||
sequence:
|
||||
|
||||
- service: light.turn_on
|
||||
|
||||
@@ -38,6 +38,11 @@
|
||||
{% endif %}
|
||||
- condition: template
|
||||
value_template: "{{ not is_state('input_select.daniel_status', 'syg') }}"
|
||||
# Gæster: ingen motion-lys om natten (22-09)
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ not is_state('input_boolean.gaester', 'on') or
|
||||
900 <= now().strftime('%H%M') | int < 2200 }}
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
|
||||
@@ -17,7 +17,11 @@
|
||||
lux_limit: "{{ states('input_number.gang_lux_threshold') | int }}"
|
||||
is_dag: >
|
||||
{% set t = now().strftime('%H%M') | int %}
|
||||
{% if is_state('binary_sensor.arbejdsdag', 'on') %}
|
||||
{% set arbejdsdag = is_state('binary_sensor.arbejdsdag', 'on') %}
|
||||
{% set start = 630 if arbejdsdag else 800 %}
|
||||
{% if is_state('input_boolean.gaester', 'on') %}
|
||||
{{ start <= t < 2300 }}
|
||||
{% elif arbejdsdag %}
|
||||
{{ 630 <= t < 2130 }}
|
||||
{% else %}
|
||||
{{ 800 <= t < 2200 }}
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
value_template: >
|
||||
{{ states('sensor.kontor_belysningsstyrke') | int <
|
||||
states('input_number.kontor_lux_threshold') | int }}
|
||||
# Gæster: ingen motion-lys om natten (22-09)
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ not is_state('input_boolean.gaester', 'on') or
|
||||
900 <= now().strftime('%H%M') | int < 2200 }}
|
||||
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
|
||||
@@ -46,6 +46,10 @@
|
||||
{% endif %}
|
||||
|
||||
action:
|
||||
# Gæster styrer stuen manuelt, også ved sengetid.
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: "off"
|
||||
- choose:
|
||||
|
||||
# Motion on: taend lys hvis lux lavt
|
||||
@@ -57,15 +61,6 @@
|
||||
{{ states('sensor.stue_belysningsstyrke') | int < lux_limit }}
|
||||
sequence:
|
||||
- choose:
|
||||
# Gæster: altid Annes favorit uanset tidspunkt
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.stue_annes_favorit
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ dagperiode == 'morgen' }}"
|
||||
@@ -118,6 +113,9 @@
|
||||
value_template: >
|
||||
{{ dagperiode not in ('aften','aften_lys') or
|
||||
is_state('media_player.samsung', 'off') }}
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: "off"
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.livingroom
|
||||
@@ -137,6 +135,9 @@
|
||||
- condition: state
|
||||
entity_id: media_player.samsung
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: "off"
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.livingroom
|
||||
@@ -171,6 +172,9 @@
|
||||
- platform: time_pattern
|
||||
minutes: "/30"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.gaester
|
||||
state: "off"
|
||||
- condition: time
|
||||
after: "00:00:00"
|
||||
before: "05:31:00"
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.indkorsel_sensor_illuminance
|
||||
below: 90
|
||||
# Gæster: kun baghaven (drivhus, paradis og Hue "baghave") spærres 22-09.
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ not is_state('input_boolean.gaester', 'on') or
|
||||
900 <= now().strftime('%H%M') | int < 2200 }}
|
||||
# - condition: time
|
||||
# before: '23:00:00'
|
||||
|
||||
@@ -43,4 +48,3 @@
|
||||
entity_id: light.extended_color_light_1
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
value_template: >
|
||||
{% set dt = states('input_datetime.vacation_end') %}
|
||||
{{ dt not in ['unknown','unavailable',''] and
|
||||
now() >= as_datetime(dt) }}
|
||||
as_timestamp(now()) >= as_timestamp(dt) }}
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
value_template: >
|
||||
{% set dt = states('input_datetime.vacation_end') %}
|
||||
{{ dt not in ['unknown','unavailable',''] and
|
||||
now() >= as_datetime(dt) }}
|
||||
as_timestamp(now()) >= as_timestamp(dt) }}
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
trigger:
|
||||
platform: time
|
||||
at: input_datetime.vanding_morgen_tid
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vanding_saeson_aktiv
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.vanding_hojbed_skiftevis
|
||||
|
||||
@@ -9,6 +13,10 @@
|
||||
trigger:
|
||||
platform: time
|
||||
at: input_datetime.vanding_aften_tid
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vanding_saeson_aktiv
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.vanding_hojbed_skiftevis
|
||||
|
||||
@@ -103,6 +111,9 @@
|
||||
- platform: time_pattern
|
||||
minutes: 0
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vanding_saeson_aktiv
|
||||
state: 'on'
|
||||
# Er denne time et af de N tidspunkter jævnt fordelt mellem kl. 9 og 21?
|
||||
# input_number.vanding_kapillaer_antal styrer antallet (0 = slået fra).
|
||||
- condition: template
|
||||
@@ -192,4 +203,3 @@
|
||||
entity_id: select.vanding_liter
|
||||
data:
|
||||
option: "{{ trigger.id }}"
|
||||
|
||||
@@ -31,9 +31,7 @@ Varme:
|
||||
|
||||
guest_automations_off:
|
||||
entities:
|
||||
- automation.der_er_nogen_i_indkorslen
|
||||
- automation.godmorgen
|
||||
- automation.godmorgen_children_arbejdsdag
|
||||
- automation.godmorgen_rul_gardin_lidt_op_og_taend_lys_i_stue
|
||||
- automation.godnat
|
||||
- automation.gruppe_kokken_uden_stue_alrum
|
||||
- automation.gruppe_kokken_stue_alrum
|
||||
@@ -41,14 +39,11 @@ guest_automations_off:
|
||||
- automation.lys_sovevaerelse_dag_arbejdsdag
|
||||
- automation.lys_sovevaerelse_dag_ikke_arbejdsdag
|
||||
- automation.sunset_stuff_on
|
||||
# Alarm-automationer der tænder Sonos-alarmer (inkl. "genaktiver" efter sygdom)
|
||||
- automation.turn_on_alarms_andreas
|
||||
- automation.turn_on_alarms_andreas_saturdays
|
||||
- automation.turn_on_alarms_andreas_tuesdays
|
||||
- automation.turn_on_alarms_badevaerelse
|
||||
- automation.turn_on_alarms_badevaerelse_afsted
|
||||
- automation.turn_on_alarms_daniel
|
||||
- automation.turn_on_alarms_daniel_afsted
|
||||
- automation.turn_on_alarms_daniel_saturdays
|
||||
- automation.turn_on_alarms_soft_wakeup
|
||||
|
||||
|
||||
|
||||
- automation.syg_daniel_genaktiver_alarmer
|
||||
- automation.syg_sovevaerelse_genaktiver_alarmer
|
||||
@@ -0,0 +1,3 @@
|
||||
vanding_saeson_aktiv:
|
||||
name: Automatisk vanding (sæson)
|
||||
icon: mdi:sprinkler-variant
|
||||
@@ -5,7 +5,7 @@ varme_komfort_andreas:
|
||||
max: 28
|
||||
step: 0.5
|
||||
unit_of_measurement: "°C"
|
||||
initial: 19
|
||||
initial: 20
|
||||
icon: mdi:thermometer
|
||||
|
||||
varme_komfort_daniel:
|
||||
@@ -14,7 +14,7 @@ varme_komfort_daniel:
|
||||
max: 28
|
||||
step: 0.5
|
||||
unit_of_measurement: "°C"
|
||||
initial: 19
|
||||
initial: 20
|
||||
icon: mdi:thermometer
|
||||
|
||||
varme_komfort_sovevaerelse:
|
||||
@@ -77,7 +77,7 @@ varme_komfort_stue:
|
||||
max: 28
|
||||
step: 0.5
|
||||
unit_of_measurement: "°C"
|
||||
initial: 23.5
|
||||
initial: 24
|
||||
icon: mdi:thermometer
|
||||
|
||||
# Globale sænkninger
|
||||
@@ -87,7 +87,7 @@ varme_nat_saenkning:
|
||||
max: 8
|
||||
step: 0.5
|
||||
unit_of_measurement: "°C"
|
||||
initial: 3
|
||||
initial: 2
|
||||
icon: mdi:weather-night
|
||||
|
||||
varme_vaek_saenkning:
|
||||
@@ -96,7 +96,7 @@ varme_vaek_saenkning:
|
||||
max: 8
|
||||
step: 0.5
|
||||
unit_of_measurement: "°C"
|
||||
initial: 3
|
||||
initial: 1.5
|
||||
icon: mdi:home-export-outline
|
||||
|
||||
varme_ferie_temp:
|
||||
@@ -114,7 +114,7 @@ varme_komfort_bryggers:
|
||||
max: 28
|
||||
step: 0.5
|
||||
unit_of_measurement: "°C"
|
||||
initial: 20
|
||||
initial: 23
|
||||
icon: mdi:thermometer
|
||||
|
||||
varme_komfort_kokken:
|
||||
@@ -123,5 +123,5 @@ varme_komfort_kokken:
|
||||
max: 28
|
||||
step: 0.5
|
||||
unit_of_measurement: "°C"
|
||||
initial: 20
|
||||
initial: 23
|
||||
icon: mdi:thermometer
|
||||
@@ -1,12 +1,34 @@
|
||||
guest_mode_on:
|
||||
sequence:
|
||||
- service: automation.turn_off
|
||||
entity_id:
|
||||
- group.guest_automations_off
|
||||
target:
|
||||
entity_id: group.guest_automations_off
|
||||
# Slå Sonos-alarmer fra der allerede er tændt (fx Daniels lørdagsalarm)
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- switch.sonos_alarm_1782 # Soft wakeup
|
||||
- switch.sonos_alarm_298 # Badeværelse
|
||||
- switch.sonos_alarm_377 # Daniel hverdag
|
||||
- switch.sonos_alarm_445 # Andreas hverdag
|
||||
- switch.sonos_alarm_3471 # Daniel lørdag
|
||||
|
||||
guest_mode_off:
|
||||
sequence:
|
||||
- service: automation.turn_on
|
||||
entity_id:
|
||||
- group.guest_automations_off
|
||||
|
||||
target:
|
||||
entity_id: group.guest_automations_off
|
||||
# Efter kl. 20:09 har aftenens alarm-automationer allerede kørt (og var slået fra),
|
||||
# så kør dem nu. Betingelserne (arbejdsdag i morgen, ikke syg) vurderes som normalt.
|
||||
- condition: template
|
||||
value_template: "{{ now().strftime('%H%M') | int >= 2009 }}"
|
||||
- service: automation.trigger
|
||||
target:
|
||||
entity_id:
|
||||
- automation.turn_on_alarms_soft_wakeup
|
||||
- automation.turn_on_alarms_andreas
|
||||
- automation.turn_on_alarms_badevaerelse
|
||||
- automation.turn_on_alarms_daniel
|
||||
- automation.turn_on_alarms_daniel_saturdays
|
||||
data:
|
||||
skip_condition: false
|
||||
Reference in new issue
Block a user