Added new freeze warning announcments and tweets
This commit is contained in:
parent
3713709e0d
commit
013b3e0635
|
@ -58,6 +58,7 @@ automation:
|
||||||
call_time_annc: 1
|
call_time_annc: 1
|
||||||
call_weather_alerts: 1
|
call_weather_alerts: 1
|
||||||
call_overnight_forecast: 1
|
call_overnight_forecast: 1
|
||||||
|
call_freeze_warning: 1
|
||||||
call_upcoming_holidays: 1
|
call_upcoming_holidays: 1
|
||||||
call_reminders: 1
|
call_reminders: 1
|
||||||
call_chores: 1
|
call_chores: 1
|
||||||
|
@ -142,3 +143,16 @@ automation:
|
||||||
{% else %}
|
{% else %}
|
||||||
07:45
|
07:45
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
- alias: Announce Freeze Warning
|
||||||
|
initial_state: 'on'
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: input_boolean.freeze_warning
|
||||||
|
to: 'on'
|
||||||
|
action:
|
||||||
|
- service: script.twitter_notify
|
||||||
|
data_template:
|
||||||
|
message: '{{ [ "Appears that the temperature will be below freezing tonight. I think I will stay inside.",
|
||||||
|
"The temperature tonight will kill sensative plants, so I just made a weather announcement. I cannot through inaction allow another to come to harm.",
|
||||||
|
"Winter is coming. Actually it is already here. I suggest sleeping with Dragon Glass." ] | random }}'
|
||||||
|
|
|
@ -170,13 +170,34 @@ script:
|
||||||
|
|
||||||
jarvis_alert:
|
jarvis_alert:
|
||||||
sequence:
|
sequence:
|
||||||
- service: switch.turn_on
|
- service: mqtt.publish
|
||||||
entity_id: switch.ha_speaker
|
data_template:
|
||||||
|
topic: 'house/polly/lastmsg'
|
||||||
|
payload: "This message is from {{ now().strftime('%-I') }}:{{ now().strftime('%M') }} {{ now().strftime('%p') }}. {{ message | truncate(220)}}"
|
||||||
|
retain: true
|
||||||
|
- service: media_player.turn_on
|
||||||
|
entity_id: media_player.theater
|
||||||
|
- service: media_player.volume_set
|
||||||
|
data_template:
|
||||||
|
entity_id: media_player.theater
|
||||||
|
volume_level: >
|
||||||
|
{% if states.input_boolean.audible_notifications.state == 'on' %}
|
||||||
|
.65
|
||||||
|
{% else %}
|
||||||
|
.65
|
||||||
|
{% endif %}
|
||||||
|
# media_player.googlehome0715, media_player.googlehomehub3492, media_player.upstairs_speaker
|
||||||
- service: tts.amazon_polly_say
|
- service: tts.amazon_polly_say
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: media_player.guest_tv
|
entity_id: >
|
||||||
|
{% if states.input_boolean.audible_notifications.state == 'on' %}
|
||||||
|
media_player.theater
|
||||||
|
{% else %}
|
||||||
|
media_player.house
|
||||||
|
{% endif %}
|
||||||
message: >-
|
message: >-
|
||||||
<speak>
|
<speak>
|
||||||
|
<break time="1.0s" />
|
||||||
{{ message }}
|
{{ message }}
|
||||||
</speak>
|
</speak>
|
||||||
cache: true
|
cache: true
|
||||||
|
@ -210,6 +231,8 @@ script:
|
||||||
message: >
|
message: >
|
||||||
{{message }}
|
{{message }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jarvis_voice:
|
jarvis_voice:
|
||||||
sequence:
|
sequence:
|
||||||
- service: mqtt.publish
|
- service: mqtt.publish
|
||||||
|
@ -444,10 +467,13 @@ script:
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro freeze_warning() %}
|
{% macro freeze_warning() %}
|
||||||
{{ [ "The temperature is expected to be near freezing. Someone might want to bring the lemon tree in. ",
|
{% if is_state("input_boolean.freeze_warning","on") %}
|
||||||
"It appears that it will be cold tonight. Think of the poor plants.",
|
{{ [ "The temperature is expected to be near or below freezing. Someone might want to bring the lemon tree in. ",
|
||||||
"I suggest bringing in the plants otherwise the temperature might kill them. And that will be on you."
|
"It appears that it will be cold tonight. Like turn water solid, cold. Think of the poor plants.",
|
||||||
|
"I suggest bringing in the plants otherwise the temperature might kill them. And that will be on you.",
|
||||||
|
"I would say winter is coming. But based on the weather forecast it appears to be here. Grab the Dragon glass."
|
||||||
] | random }}
|
] | random }}
|
||||||
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro upcoming_birthdays() %}
|
{% macro upcoming_birthdays() %}
|
||||||
|
@ -614,13 +640,18 @@ script:
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro garage_door_status() %}
|
{% macro garage_door_status() %}
|
||||||
{% if is_state("binary_sensor.garage_door_contact_2", "on") %}
|
{% if is_state("binary_sensor.garage_door", "on") %}
|
||||||
{{ [ "The garage door is open. ",
|
{{ [ "The garage door is open. ",
|
||||||
"The pod bay doors are open. ",
|
"The pod bay doors are open. ",
|
||||||
"Someone forgot to close the garage."
|
"Someone forgot to close the garage."
|
||||||
] | random }}
|
] | random }}
|
||||||
|
{% elif is_state("binary_sensor.side_door", "on") %}
|
||||||
|
{{ [ "The side door is ajar. ",
|
||||||
|
"The side door is open. ",
|
||||||
|
"Someone forgot to close the side door."
|
||||||
|
] | random }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ [ "The garage door is closed. ",
|
{{ [ "The garage doors are closed. ",
|
||||||
"The cargo hold is sealed. ",
|
"The cargo hold is sealed. ",
|
||||||
"Looks like the garage has been secured.",
|
"Looks like the garage has been secured.",
|
||||||
"The pod bay doors are closed. Do not ask me to open them."
|
"The pod bay doors are closed. Do not ask me to open them."
|
||||||
|
|
|
@ -21,6 +21,11 @@ group:
|
||||||
entities:
|
entities:
|
||||||
- sensor.nws_alerts
|
- sensor.nws_alerts
|
||||||
|
|
||||||
|
input_boolean:
|
||||||
|
freeze_warning:
|
||||||
|
name: Freeze Warning
|
||||||
|
icon: mdi:snowflake-alert
|
||||||
|
|
||||||
### You first need to find either your NWS Zone ID or County ID. I’m not sure which is better but I used my Zone ID here.
|
### You first need to find either your NWS Zone ID or County ID. I’m not sure which is better but I used my Zone ID here.
|
||||||
### You can find your Zone ID by going to https://alerts.weather.gov/ 7, scroll down to your state and click on the “zone list” then look for the entry for your county.
|
### You can find your Zone ID by going to https://alerts.weather.gov/ 7, scroll down to your state and click on the “zone list” then look for the entry for your county.
|
||||||
### I recommond useing both
|
### I recommond useing both
|
||||||
|
@ -191,6 +196,23 @@ automation:
|
||||||
title: "Tornado Warning!"
|
title: "Tornado Warning!"
|
||||||
message: "The National Weather Service Has issued a Tornado Warning for our area."
|
message: "The National Weather Service Has issued a Tornado Warning for our area."
|
||||||
|
|
||||||
|
- alias: NWS Freeze Warning
|
||||||
|
initial_state: 'on'
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: sensor.nws_alerts
|
||||||
|
condition:
|
||||||
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{states.sensor.nws_alerts.state | int > 0}}"
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ 'Freeze Warning' in states.sensor.nws_alerts.attributes.title}}"
|
||||||
|
action:
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
entity_id: input_boolean.freeze_warning
|
||||||
|
|
||||||
|
|
||||||
- alias: Activate Tornado alarm
|
- alias: Activate Tornado alarm
|
||||||
initial_state: 'on'
|
initial_state: 'on'
|
||||||
trigger:
|
trigger:
|
||||||
|
@ -199,11 +221,8 @@ automation:
|
||||||
from: 'off'
|
from: 'off'
|
||||||
to: 'on'
|
to: 'on'
|
||||||
action:
|
action:
|
||||||
- service: media_player.play_media
|
- service: script.turn_on
|
||||||
entity_id: media_player.theater
|
entity_id: script.tornado_alarm
|
||||||
data:
|
|
||||||
media_content_id: /media/audio/Tornado_Siren.mp3
|
|
||||||
media_content_type: "music"
|
|
||||||
|
|
||||||
- alias: Deactivate Tornado alarm
|
- alias: Deactivate Tornado alarm
|
||||||
initial_state: 'on'
|
initial_state: 'on'
|
||||||
|
@ -212,8 +231,9 @@ automation:
|
||||||
entity_id: input_boolean.tornado_alarm
|
entity_id: input_boolean.tornado_alarm
|
||||||
from: 'on'
|
from: 'on'
|
||||||
to: 'off'
|
to: 'off'
|
||||||
|
|
||||||
action:
|
action:
|
||||||
|
- service: script.turn_off
|
||||||
|
entity_id: script.tornado_alarm
|
||||||
- service: media_player.media_stop
|
- service: media_player.media_stop
|
||||||
entity_id: media_player.theater
|
entity_id: media_player.theater
|
||||||
|
|
||||||
|
@ -240,4 +260,17 @@ script:
|
||||||
|
|
||||||
tornado_alarm:
|
tornado_alarm:
|
||||||
sequence:
|
sequence:
|
||||||
- service: shell_command.tornado_alarm
|
- delay:
|
||||||
|
seconds: 15
|
||||||
|
- service: media_player.play_media
|
||||||
|
entity_id: media_player.theater
|
||||||
|
data:
|
||||||
|
media_content_id: http://192.168.7.40/audio/tornado_alarm.mp3
|
||||||
|
media_content_type: "music"
|
||||||
|
- delay:
|
||||||
|
seconds: 110
|
||||||
|
- service: media_player.play_media
|
||||||
|
entity_id: media_player.theater
|
||||||
|
data:
|
||||||
|
media_content_id: http://192.168.7.40/audio/tornado_alarm.mp3
|
||||||
|
media_content_type: "music"
|
Loading…
Reference in New Issue