Added time readout to daily announcements.
This commit is contained in:
parent
e9963790ce
commit
b0216d9f37
|
@ -59,6 +59,7 @@ automation:
|
|||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_time_annc: 1
|
||||
call_prebed_routine: 1
|
||||
|
||||
- id: nightly_report
|
||||
|
@ -72,6 +73,7 @@ automation:
|
|||
data:
|
||||
call_greeting: 1
|
||||
call_evening_greeting: 1
|
||||
call_time_annc: 1
|
||||
call_weather_alerts: 1
|
||||
call_overnight_forecast: 1
|
||||
call_upcoming_holidays: 1
|
||||
|
@ -89,6 +91,7 @@ automation:
|
|||
data:
|
||||
call_greeting: 1
|
||||
call_morning_greeting: 1
|
||||
call_time_annc: 1
|
||||
call_weather_alerts: 1
|
||||
call_todays_events: 1
|
||||
call_current_conditions_outisde: 1
|
||||
|
@ -120,6 +123,7 @@ automation:
|
|||
- service: script.ah_report
|
||||
data:
|
||||
call_interuption: 1
|
||||
call_time_annc: 1
|
||||
call_skylar_dressed: 1
|
||||
call_school_today: 1
|
||||
call_skylar_events: 1
|
||||
|
|
|
@ -306,6 +306,8 @@ script:
|
|||
"There is something that needs your attention."
|
||||
] | random }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
{% macro morning_greeting() %}
|
||||
{{ [ "Anchorage House. Rise and Shine. ",
|
||||
|
@ -332,6 +334,20 @@ script:
|
|||
] | random }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro time_annc() %}
|
||||
|
||||
{% if now().strftime('%H')|int < 12 %}
|
||||
It is now {{ now().strftime('%H')|int }} {{ now().strftime('%M')|int }} AM.
|
||||
|
||||
{% elif now().strftime('%H')|int > 12 %}
|
||||
It is now {{ now().strftime('%H')|int - 12 }} {{ now().strftime('%M')|int }} PM.
|
||||
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
{% macro weather_alerts() %}
|
||||
There are currently {{states.sensor.nws_alerts.state }} active weather alerts for our area.
|
||||
The National Weather Service Has issued,
|
||||
|
@ -745,6 +761,10 @@ script:
|
|||
{{ evening_greeting() }}
|
||||
{% endif %}
|
||||
|
||||
{% if call_time_annc == 1 %}
|
||||
{{ time_annc() }}
|
||||
{% endif %}
|
||||
|
||||
{% if states.sensor.nws_alerts.state | int > 0 and call_weather_alerts == 1 %}
|
||||
{{ weather_alerts() }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue