initial commit
This commit is contained in:
26
configuration/automation/global_time_of_the_day.yaml
Normal file
26
configuration/automation/global_time_of_the_day.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
# Parts of the Day
|
||||
# ------------------------------------------
|
||||
# Morning 5 am to 12 pm (noon)
|
||||
# Early morning 5 am to 8 am
|
||||
# Late morning 11 am to 12pm
|
||||
# Afternoon 12 pm to 5 pm
|
||||
# Early afternoon 1 pm to 3 pm
|
||||
# Late afternoon 4 pm to 5 pm
|
||||
# Evening 5 pm to 9 pm
|
||||
# Early evening 5 pm to 7 pm
|
||||
# Night 9 pm to 4 am
|
||||
|
||||
- alias: '[Global] Set time of the day'
|
||||
initial_state: 'true'
|
||||
trigger:
|
||||
platform: time_pattern
|
||||
minutes: 0
|
||||
action:
|
||||
service: input_select.select_option
|
||||
data_template:
|
||||
entity_id: input_select.parts_of_the_day
|
||||
option: >
|
||||
{% if now().hour < 5 %}Night
|
||||
{% elif now().hour < 12 %}Morning
|
||||
{% elif now().hour < 18 %}Afternoon
|
||||
{% else %}Evening{% endif %}
|
Reference in New Issue
Block a user