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'
|
2020-07-20 18:33:03 +00:00
|
|
|
id: 14115d72-6bea-41c1-8411-1eaf41b4ef2b
|
2018-01-02 00:00:45 +00:00
|
|
|
trigger:
|
|
|
|
- platform: state
|
2020-02-25 00:52:57 +00:00
|
|
|
entity_id: group.garage_doors
|
2018-01-02 00:00:45 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: sun.sun
|
|
|
|
to: 'below_horizon'
|
|
|
|
from: 'above_horizon'
|
|
|
|
|
|
|
|
condition:
|
2019-10-07 18:25:05 +00:00
|
|
|
- condition: state
|
|
|
|
entity_id: sun.sun
|
|
|
|
state: 'below_horizon'
|
2018-01-02 00:00:45 +00:00
|
|
|
|
|
|
|
action:
|
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.front_full_brightness
|
2020-06-09 17:57:37 +00:00
|
|
|
|
2020-06-25 14:00:18 +00:00
|
|
|
- service: light.turn_on
|
|
|
|
entity_id:
|
|
|
|
- light.living_room_accents
|
|
|
|
data_template:
|
|
|
|
# Red if Open, Gold if Closed
|
2020-06-25 15:20:27 +00:00
|
|
|
color_name: >
|
2020-06-25 14:00:18 +00:00
|
|
|
{% if states.group.entry_points.state == 'on' or states.group.garage_doors.state != 'closed' -%}
|
2020-06-25 15:20:27 +00:00
|
|
|
red
|
2020-06-25 14:00:18 +00:00
|
|
|
{% else %}
|
2020-06-25 15:20:27 +00:00
|
|
|
gold
|
2020-06-25 14:00:18 +00:00
|
|
|
{% endif %}
|
2018-10-06 00:16:42 +00:00
|
|
|
|
|
|
|
- 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
|
2019-10-07 18:25:05 +00:00
|
|
|
- switch.foyer_outlet
|
2018-01-02 00:00:45 +00:00
|
|
|
- wait_template: >-
|
2020-06-09 01:51:27 +00:00
|
|
|
{{ states.group.garage_doors.state == 'closed' }}
|
2018-01-02 00:00:45 +00:00
|
|
|
- service: script.monthly_color_scene
|
|
|
|
- service: light.turn_on
|
|
|
|
entity_id:
|
2020-06-07 20:06:43 +00:00
|
|
|
- light.living_room_accents
|
2018-01-02 00:00:45 +00:00
|
|
|
data_template:
|
2020-06-05 18:24:37 +00:00
|
|
|
# Red if Open, Gold if Closed
|
2020-06-25 15:20:27 +00:00
|
|
|
color_name: >
|
2020-02-25 00:52:57 +00:00
|
|
|
{% if states.group.entry_points.state == 'on' or states.group.garage_doors.state != 'closed' -%}
|
2020-06-25 15:20:27 +00:00
|
|
|
red
|
2018-01-02 00:00:45 +00:00
|
|
|
{% else %}
|
2020-06-25 15:20:27 +00:00
|
|
|
gold
|
2018-01-02 00:00:45 +00:00
|
|
|
{% endif %}
|