Files
N22/include/automations/gaester.yaml
T
clausandCopilot bf4395c441 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>
2026-11-08 13:10:53 +01:00

136 lines
3.7 KiB
YAML

- 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