Home-AssistantConfig/config/automation/late_night_outside_helper.yaml

64 lines
1.8 KiB
YAML
Raw Normal View History

2018-01-02 00:00:45 +00:00
###################################
## Late Night lights Section
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
###################################
- alias: 'Late Night Helper outside'
trigger:
- platform: state
entity_id: group.all_covers
to: 'open'
- platform: state
entity_id: sun.sun
to: 'below_horizon'
from: 'above_horizon'
condition:
condition: and
conditions:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: group.all_covers
state: 'open'
action:
- service: scene.turn_on
entity_id: scene.front_full_brightness
- service: light.turn_on
entity_id:
- group.living_room_accents
data_template:
color_name: >
{% if states.group.entry_points.state == 'on' or states.group.all_covers.state != 'closed' -%}
red
{% else %}
gold
{% endif %}
- service_template: >
{% 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 %}
2018-01-02 00:00:45 +00:00
entity_id:
2019-08-17 19:18:36 +00:00
- group.master_bathroom_accents
2018-01-02 00:00:45 +00:00
- switch.back_landscaping
- switch.front_door_outlet
- wait_template: >-
{{ states.group.garage_doors.state == 'closed' }}
- service: script.monthly_color_scene
- service: light.turn_on
entity_id:
- group.living_room_accents
data_template:
color_name: >
{% if states.group.entry_points.state == 'on' or states.group.all_covers.state != 'closed' -%}
red
{% else %}
gold
{% endif %}