You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.8 KiB

######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Late Night Helper Outside - brighten exterior and restore after secure
# Turns on front scene/outlets after dark when doors open or at sunset.
# -------------------------------------------------------------------
# Notes: Debounced garage/front door triggers to avoid noisy state flaps
# from repeatedly re-running the outside lighting routine.
######################################################################
- alias: 'Late Night Helper outside'
id: 14115d72-6bea-41c1-8411-1eaf41b4ef2b
trigger:
- platform: state
entity_id: group.garage_doors
to: 'open'
for: "00:00:15"
- platform: state
entity_id: binary_sensor.mcu1_gpio5 #front door
to: 'on'
for: "00:00:02"
- platform: state
entity_id: sun.sun
to: 'below_horizon'
from: 'above_horizon'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
action:
- service: scene.turn_on
entity_id: scene.front_full_brightness
- service: >
{% set hour=states("sensor.time").split(':')[0] | int %}
{% if hour >= 5 and hour <= 9 and states.group.bed.state == 'on'%}
switch.turn_off
{% else %}
switch.turn_on
{% endif %}
entity_id:
- group.master_bathroom_accents
- switch.back_landscaping
- switch.front_door_outlet
- switch.foyer_outlet
- wait_template: "{{ is_state('group.entry_points', 'off') }}"
- wait_template: "{{ is_state('group.garage_doors', 'closed') }}"
- service: script.monthly_color_scene

Powered by TurnKey Linux.