Added new holiday sensor to combine national holidays and Anchorage House Holidays
This commit is contained in:
parent
bbd0c54cb0
commit
7aaabab2a5
|
@ -12,7 +12,6 @@ automation:
|
|||
trigger:
|
||||
- platform: time
|
||||
at: '03:00:00'
|
||||
condition:
|
||||
action:
|
||||
- service: clean_up_snapshots_service.clean_up
|
||||
|
||||
|
@ -22,10 +21,10 @@ automation:
|
|||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '00:01:45'
|
||||
condition:
|
||||
at: '04:30:00'
|
||||
action:
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.today_is
|
||||
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: sensor.holiday
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
days: 7
|
||||
- platform: history_stats
|
||||
name: Speech time
|
||||
entity_id: media_player.theater
|
||||
entity_id: media_player.ha_speaker
|
||||
state: 'playing'
|
||||
type: time
|
||||
end: '{{ now() }}'
|
||||
|
@ -298,4 +298,13 @@
|
|||
today_is:
|
||||
friendly_name: 'Today is'
|
||||
value_template: "{{ ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'][now().weekday()] }}"
|
||||
|
||||
holiday:
|
||||
friendly_name: 'Holiday'
|
||||
value_template: >-
|
||||
{% if states.calendar.holidays_in_united_states.state == 'on' %}
|
||||
{{ states.calendar.holidays_in_united_states.attributes.message }}
|
||||
{% elif states.calendar.anchorage_holidays.state == 'on' %}
|
||||
{{ states.calendar.anchorage_holidays.attributes.message }}
|
||||
{% else %}
|
||||
none
|
||||
{% endif %}
|
Loading…
Reference in New Issue