Home-AssistantConfig/config/automation/Timed_Triggers/sunset_turn_on.yaml

87 lines
3.2 KiB
YAML
Raw Normal View History

2018-01-02 00:00:45 +00:00
###################################
## Sunrise and Sunset stuff
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
###################################
- alias: 'Sunset Stuff on'
trigger:
- platform: sun
event: sunset
offset: "-00:20:00"
2018-01-02 00:00:45 +00:00
action:
- delay: '00:{{ (range(1, 20)|random|int) }}:00'
- service: script.tweet_engine_image
2018-01-02 00:00:45 +00:00
data_template:
tweet: >-
2018-01-02 00:00:45 +00:00
{{ [
"Right before sunset, I turn on the outdoor lights.",
"The sun is offical down. Exterior Cameras are now motion acivated.",
"Since it gets dark around sunset, I will turn on the landscaping lights.",
"The sun has been ushered off the stage. Activate the perimiter cameras.",
"When the Sun goes down, I help out by turning on the outside lights. It is the little things in life.",
2018-01-12 22:50:45 +00:00
"Time to turn on the Landscaping lights.",
"Daytime is over, Time to turn on the exterior lights.",
"Once the Sun goes down, we turn on the exterior lights.",
"Switching to night mode!",
"Since it is sunset, I will turn on the exterior lights.",
"The outside world has switched to dark mode.",
"If you have not looked outside lately the light of the day is gone."
2018-01-02 00:00:45 +00:00
] | random + [
" #Sunset",
" #HomeAutomation",
" #AccentLighting",
" (https://www.vcloudinfo.com/2017/08/diy-outdoor-smart-home-led-strips.html)",
" (https://youtu.be/FcBVu_yk2iY)",
" (https://www.vcloudinfo.com/2018/09/unboxing-philips-hue-calla-landscape.html)"
2018-01-02 00:00:45 +00:00
] | random }}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/light.png",
"/config/www/custom_ui/floorplan/images/branding/light2.png",
"/config/www/custom_ui/floorplan/images/branding/light3.png",
2018-03-18 00:11:11 +00:00
"/config/www/custom_ui/floorplan/images/branding/light4.png",
2018-04-07 01:46:54 +00:00
"/config/www/custom_ui/floorplan/images/branding/landscape_light.png",
"/config/www/custom_ui/floorplan/images/branding/sunset.png"
] | random }}
2018-01-02 00:00:45 +00:00
- service: script.speech_engine
data:
call_dark_outside: 1
call_window_check: 1
- service: homeassistant.turn_on
entity_id:
- switch.front_landscaping
- light.bedroom
2018-01-02 00:00:45 +00:00
- service: script.monthly_color_scene
- service: light.turn_on
entity_id:
- light.outdoor_bathroom
data_template:
brightness: >
{% if states.group.family.state == 'home' -%}
10
{% else %}
150
{% endif %}
2018-01-02 00:00:45 +00:00
- wait_template: >-
{{ states.group.family.state == 'home' }}
- service: switch.turn_on
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
- switch.foyer_outlet
- switch.den_outlet
- switch.living_room_outlet
2018-01-02 00:00:45 +00:00
- service: light.turn_on
entity_id:
- group.living_room_accents
- wait_template: >-
{{ is_state('group.garage_doors', 'closed') }}
- wait_template: >-
{{ is_state('group.entry_points', 'off') }}
- service: script.speech_engine
data:
call_garage_check: 1
call_window_check: 1