- 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>
68 lines
1.9 KiB
YAML
68 lines
1.9 KiB
YAML
- id: andreas_arrival_lights_pro
|
|
alias: Andreas hjem - udelys (pro)
|
|
description: Tænder udelys ved hjemkomst i mørke/tusmørke og slukker igen efter 10 min
|
|
mode: restart
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: person.andreas_schusler_dethlefsen
|
|
from: "not_home"
|
|
to: "home"
|
|
for: "00:00:15"
|
|
|
|
condition:
|
|
# Andreas skal have været væk lidt tid
|
|
- condition: state
|
|
entity_id: person.andreas_schusler_dethlefsen
|
|
state: "home"
|
|
|
|
# Lux skal være lav
|
|
- condition: numeric_state
|
|
entity_id: sensor.indkorsel_sensor_illuminance
|
|
below: 120
|
|
|
|
# Solen skal være lav (backup hvis lux sensor er upålidelig)
|
|
- condition: numeric_state
|
|
entity_id: sun.sun
|
|
attribute: elevation
|
|
below: 4
|
|
|
|
action:
|
|
- variables:
|
|
lights: >
|
|
{% set base = ['light.indkorsel_2', 'light.garage'] %}
|
|
{% 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 }}
|
|
{% endif %}
|
|
|
|
lights_to_turn_on: >
|
|
{{ lights | select('is_state','off') | list }}
|
|
|
|
- choose:
|
|
- conditions: "{{ lights_to_turn_on | length > 0 }}"
|
|
sequence:
|
|
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: "{{ lights_to_turn_on }}"
|
|
|
|
- service: switch.turn_on
|
|
data:
|
|
entity_id: switch.stik_indkorsel
|
|
|
|
- delay: "00:10:00"
|
|
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: "{{ lights_to_turn_on }}"
|
|
|
|
- service: switch.turn_off
|
|
data:
|
|
entity_id: switch.stik_indkorsel
|
|
|