-
-
Notifications
You must be signed in to change notification settings - Fork 503
/
Copy pathsunset_turn_on.yaml
executable file
·58 lines (54 loc) · 1.56 KB
/
sunset_turn_on.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
###################################
## Sunrise and Sunset stuff
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
###################################
- alias: 'Sunset Stuff on'
id: d0db568c-0aa2-42cc-b5be-ba546e39b639
mode: queued
trigger:
- platform: sun
event: sunset
offset: "-00:15:00"
condition:
- condition: template
value_template: "{{ states('binary_sensor.powerwall_grid_status') == 'on' }}"
action:
- delay: '00:{{ (range(1, 20)|random|int) }}:00'
- service: script.speech_engine
data:
call_dark_outside: 1
call_window_check: 1
- service: homeassistant.turn_on
entity_id:
- switch.front_landscaping
- switch.villaneri
- light.bedroom
- group.outdoor_seasonal
- service: script.monthly_color_scene
- service: light.turn_on
entity_id:
- light.outdoor_bathroom
data:
brightness: >
{% if states.group.family.state == 'home' -%}
10
{% else %}
150
{% endif %}
- wait_template: >-
{{ states.group.family.state == 'home' }}
- service: homeassistant.turn_on
entity_id:
- group.master_bathroom_accents
- switch.back_landscaping
- switch.front_door_outlet
- switch.foyer_outlet
- switch.den_outlet
- switch.front_office_lamp
- switch.living_room_outlet
- switch.living_room_tv_outlet
- service: light.turn_on
entity_id:
- light.living_room_accents
- light.upstairs_lamp