Files
N22/include/automations/lys_kontor.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

87 lines
2.2 KiB
YAML

- id: kontor_motion_lys
alias: Kontor lys via bevægelse
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.kontor_motion_bevaegelse
to: "on"
condition:
- condition: template
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
target:
entity_id: scene.kontor_klar
- id: kontor_motion_sluk_dag
alias: Sluk kontor lys efter 10 min uden bevægelse
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.kontor_motion_bevaegelse
to: "off"
condition:
- condition: time
after: "06:00:00"
before: "23:59:00"
action:
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.kontor_motion_bevaegelse
to: "on"
timeout:
minutes: "{{ states('input_number.kontor_timeout_day') | int }}"
continue_on_timeout: true
- condition: state
entity_id: binary_sensor.kontor_motion_bevaegelse
state: "off"
- service: light.turn_off
target:
entity_id: light.strip
- id: kontor_motion_sluk_nat
alias: Sluk kontor lys efter 5 min uden bevægelse om natten
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.kontor_motion_bevaegelse
to: "off"
condition:
- condition: or
conditions:
- condition: time
before: "06:00:00"
- condition: time
after: "23:59:00"
action:
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.kontor_motion_bevaegelse
to: "on"
timeout:
minutes: "{{ states('input_number.kontor_timeout_night') | int }}"
continue_on_timeout: true
- condition: state
entity_id: binary_sensor.kontor_motion_bevaegelse
state: "off"
- service: light.turn_off
target:
entity_id: light.strip