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:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
at: '03:00:00'
|
at: '03:00:00'
|
||||||
condition:
|
|
||||||
action:
|
action:
|
||||||
- service: clean_up_snapshots_service.clean_up
|
- service: clean_up_snapshots_service.clean_up
|
||||||
|
|
||||||
|
@ -22,10 +21,10 @@ automation:
|
||||||
initial_state: 'on'
|
initial_state: 'on'
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
at: '00:01:45'
|
at: '04:30:00'
|
||||||
condition:
|
|
||||||
action:
|
action:
|
||||||
- service: homeassistant.update_entity
|
- service: homeassistant.update_entity
|
||||||
entity_id: sensor.today_is
|
entity_id: sensor.today_is
|
||||||
|
- service: homeassistant.update_entity
|
||||||
|
entity_id: sensor.holiday
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
days: 7
|
days: 7
|
||||||
- platform: history_stats
|
- platform: history_stats
|
||||||
name: Speech time
|
name: Speech time
|
||||||
entity_id: media_player.theater
|
entity_id: media_player.ha_speaker
|
||||||
state: 'playing'
|
state: 'playing'
|
||||||
type: time
|
type: time
|
||||||
end: '{{ now() }}'
|
end: '{{ now() }}'
|
||||||
|
@ -298,4 +298,13 @@
|
||||||
today_is:
|
today_is:
|
||||||
friendly_name: 'Today is'
|
friendly_name: 'Today is'
|
||||||
value_template: "{{ ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'][now().weekday()] }}"
|
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