Compare commits
21 Commits
2025.2.5
...
response_v
Author | SHA1 | Date | |
---|---|---|---|
b48380d152
|
|||
d649d0fa5c
|
|||
abd30f7ff2
|
|||
c32c751e97
|
|||
177c4a9a51
|
|||
ec8e22513c
|
|||
49f9e99439
|
|||
6254fb5953
|
|||
334b7963e8
|
|||
4466b17df1
|
|||
f96056edda
|
|||
652b4e7dff
|
|||
26bcf136e6
|
|||
9e90998a21
|
|||
30c8307272
|
|||
e6b0db142e
|
|||
b5dd9621d1
|
|||
587ac4d203
|
|||
b459d78446
|
|||
352e4f1ada
|
|||
09d82abdb1
|
@ -1 +1 @@
|
|||||||
2025.2.5
|
2025.3.3
|
@ -321,6 +321,9 @@ influxdb:
|
|||||||
- sensor.dimmest_room
|
- sensor.dimmest_room
|
||||||
- sensor.warmest_room_temperature
|
- sensor.warmest_room_temperature
|
||||||
- sensor.coldest_room_temperature
|
- sensor.coldest_room_temperature
|
||||||
|
- sensor.national_tornado_warnings
|
||||||
|
- sensor.national_severe_thunderstorm_warnings
|
||||||
|
- binary_sensor.severe_thunderstorm_warning
|
||||||
|
|
||||||
logbook:
|
logbook:
|
||||||
include:
|
include:
|
||||||
@ -498,3 +501,6 @@ prometheus:
|
|||||||
- sensor.dimmest_room
|
- sensor.dimmest_room
|
||||||
- sensor.warmest_room_temperature
|
- sensor.warmest_room_temperature
|
||||||
- sensor.coldest_room_temperature
|
- sensor.coldest_room_temperature
|
||||||
|
- sensor.national_tornado_warnings
|
||||||
|
- sensor.national_severe_thunderstorm_warnings
|
||||||
|
- binary_sensor.severe_thunderstorm_warning
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
{% macro weatherInfo(type,method,time) %}
|
{% macro weatherInfo(type,method,time) %}
|
||||||
{% set time = time|default('day') %}
|
{% set time = time|default('day') %}
|
||||||
{% if method == 'text' %}
|
{% if method in ['text','dashboard'] %}
|
||||||
{% if type in ['current','full'] %}
|
{% if type in ['current','full'] %}
|
||||||
The current weather is {{ states('weather.iron_nerd_weather_station') | lower }}. It is {{ state_attr('weather.iron_nerd_weather_station','temperature') | round }} degrees outside and feels like {{ states('sensor.stratton_ave_apparent_temperature') | round }} degrees.
|
The current weather is {{ states('weather.iron_nerd_weather_station') | lower }}. It is {{ state_attr('weather.iron_nerd_weather_station','temperature') | round }} degrees outside and feels like {{ states('sensor.home_temperature_feels_like') | round }} degrees.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if type in ['forecast','full'] %}
|
{% if type in ['forecast','full'] %}
|
||||||
{% if 14400 <= ct <= 61200 %}
|
{% if 14400 <= ct <= 61200 %}
|
||||||
@ -19,15 +19,28 @@
|
|||||||
{% if type in ['alerts','full'] %}
|
{% if type in ['alerts','full'] %}
|
||||||
{% if is_state('input_boolean.tornado_alarm','on') %}
|
{% if is_state('input_boolean.tornado_alarm','on') %}
|
||||||
We are under a tornado warning. If you are not already in shelter, you should be. Get on it!
|
We are under a tornado warning. If you are not already in shelter, you should be. Get on it!
|
||||||
{% elif states('sensor.weatheralerts_active_alerts') > '0' %}
|
{% if state_attr('binary_sensor.tornado_warning','confirmed' == true) %}
|
||||||
|
A tornado has been confirmed in the area. Please take shelter immediately!
|
||||||
|
{% endif %}
|
||||||
|
{% elif is_state('binary_sensor.severe_thunderstorm_warning','on') %}
|
||||||
|
We are under a severe thunderstorm warning.
|
||||||
|
{% if state_attr('binary_sensor.severe_thunderstorm_warning','tornado_possible' == true) %}
|
||||||
|
The incoming storm has the potential to produce a tornado, so please pay attention and prepare to take shelter!
|
||||||
|
{% endif %}
|
||||||
|
{% if state_attr('binary_sensor.severe_thunderstorm_warning','considerable_destructive' == true) %}
|
||||||
|
This storm has the potential to cause considerable damage. Please take shelter and stay safe!
|
||||||
|
{% endif %}
|
||||||
|
{% elif states('sensor.weatheralerts_active_alerts') > '0' and method != 'dashboard' %}
|
||||||
Current weather alerts: {{ states('sensor.weather_alert_string') }}.
|
Current weather alerts: {{ states('sensor.weather_alert_string') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('binary_sensor.lightning_warning','on') %}
|
{% if method != 'dashboard' %}
|
||||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
{% if is_state('binary_sensor.lightning_warning','on') %}
|
||||||
There is lightning in the area. Nearest strike is {{ ltgdist }} miles away.
|
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||||
{% endif %}
|
There is lightning in the area. Nearest strike is {{ ltgdist }} miles away.
|
||||||
{% if is_state('binary_sensor.raining','on') %}
|
{% endif %}
|
||||||
It is currently raining. Make sure all doors and windows are closed!
|
{% if is_state('binary_sensor.raining','on') %}
|
||||||
|
It is currently raining. Make sure all doors and windows are closed!
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if state_attr('weather.iron_nerd_weather_station','visibility') | int < 3 %}
|
{% if state_attr('weather.iron_nerd_weather_station','visibility') | int < 3 %}
|
||||||
Caution: Current outdoor visibility is {{ state_attr('weather.iron_nerd_weather_station','visibility') }} miles.
|
Caution: Current outdoor visibility is {{ state_attr('weather.iron_nerd_weather_station','visibility') }} miles.
|
||||||
@ -47,6 +60,17 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.tornado_alarm','on') %}
|
{% if is_state('input_boolean.tornado_alarm','on') %}
|
||||||
"We are under a tornado warning. If you are not already in shelter, you should be. Get on it! "
|
"We are under a tornado warning. If you are not already in shelter, you should be. Get on it! "
|
||||||
|
{% if state_attr('binary_sensor.tornado_warning','confirmed' == true) %}
|
||||||
|
"A tornado has been confirmed in the area. Please take shelter immediately! "
|
||||||
|
{% endif %}
|
||||||
|
{% elif is_state('binary_sensor.severe_thunderstorm_warning','on') %}
|
||||||
|
"We are under a severe thunderstorm warning. "
|
||||||
|
{% if state_attr('binary_sensor.severe_thunderstorm_warning','tornado_possible' == true) %}
|
||||||
|
"The incoming storm has the potential to produce a tornado, so please pay attention and prepare to take shelter! "
|
||||||
|
{% endif %}
|
||||||
|
{% if state_attr('binary_sensor.severe_thunderstorm_warning','considerable_destructive' == true) %}
|
||||||
|
"This storm has the potential to cause considerable damage. Please take shelter and stay safe! "
|
||||||
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.tornado_watch','on') %}
|
{% elif is_state('input_boolean.tornado_watch','on') %}
|
||||||
{{ [
|
{{ [
|
||||||
"There is currently a tornado watch active. Please keep an eye on the sky and your local weather reports. ",
|
"There is currently a tornado watch active. Please keep an eye on the sky and your local weather reports. ",
|
||||||
@ -101,7 +125,11 @@
|
|||||||
|
|
||||||
{% macro weatherReport(type,method,time) %}
|
{% macro weatherReport(type,method,time) %}
|
||||||
{% macro data() %}
|
{% macro data() %}
|
||||||
{{ weatherInfo(type,method,time) | replace('clear-night','clear') | replace('partlycloudy','partly cloudy') }}
|
{{ weatherInfo(type,method,time) |
|
||||||
|
replace('clear-night','clear') |
|
||||||
|
replace('partlycloudy','partly cloudy') |
|
||||||
|
replace('snowy-rainy','a mix of rain and snow') |
|
||||||
|
replace('lightning-rainy','stormy') }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
{{ cleanup(data()) }}
|
{{ cleanup(data()) }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -2,19 +2,23 @@ template:
|
|||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: Emma Aircon - Compressor
|
- name: Emma Aircon - Compressor
|
||||||
unique_id: 21bcbb62-823c-43ff-8c2c-26e940324ee6
|
unique_id: 21bcbb62-823c-43ff-8c2c-26e940324ee6
|
||||||
state: "{{ is_state('fan.emma_air_conditioner','on') and states('sensor.emma_air_conditioner_power') | int > 150 }}"
|
state: "{{ states('sensor.emma_air_conditioner_power') | int > 150 }}"
|
||||||
|
availability: "{{ states('fan.emma_air_conditioner') not in ['unknown','unavailable'] }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
- name: Emma Aircon - Fan
|
- name: Emma Aircon - Fan
|
||||||
unique_id: 9e3054cf-8f7e-4fef-9da4-5b2f2bc99c9d
|
unique_id: 9e3054cf-8f7e-4fef-9da4-5b2f2bc99c9d
|
||||||
state: "{{ is_state('fan.emma_air_conditioner','on') and states('sensor.emma_air_conditioner_power') | int > 20 }}"
|
state: "{{ states('sensor.emma_air_conditioner_power') | int > 20 }}"
|
||||||
|
availability: "{{ states('fan.emma_air_conditioner') not in ['unknown','unavailable'] }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
- name: Master Bedroom Aircon - Compressor
|
- name: Master Bedroom Aircon - Compressor
|
||||||
unique_id: 87051957-1dbc-4d65-b138-e8469728f58f
|
unique_id: 87051957-1dbc-4d65-b138-e8469728f58f
|
||||||
state: "{{ states('climate.master_bedroom_aircon') not in ['off','unknown','unavailable'] and states('sensor.master_bedroom_aircon_power') | int > 150 }}"
|
state: "{{ states('sensor.master_bedroom_aircon_power') | int > 150 }}"
|
||||||
|
availability: "{{ states('climate.master_bedroom_aircon') not in ['unknown','unavailable'] }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
- name: Master Bedroom Aircon - Fan
|
- name: Master Bedroom Aircon - Fan
|
||||||
unique_id: ae893dd6-129c-4886-a966-a89b958d9f08
|
unique_id: ae893dd6-129c-4886-a966-a89b958d9f08
|
||||||
state: "{{ states('climate.master_bedroom_aircon') not in ['off','unknown','unavailable'] and states('sensor.master_bedroom_aircon_power') | int > 20 }}"
|
state: "{{ states('sensor.master_bedroom_aircon_power') | int > 20 }}"
|
||||||
|
availability: "{{ states('climate.master_bedroom_aircon') not in ['unknown','unavailable'] }}"
|
||||||
device_class: running
|
device_class: running
|
||||||
- name: Kallen Fan - Separate Schedule
|
- name: Kallen Fan - Separate Schedule
|
||||||
unique_id: 3f243861-6a1f-412f-b9e3-933b54793b08
|
unique_id: 3f243861-6a1f-412f-b9e3-933b54793b08
|
||||||
|
@ -980,7 +980,33 @@ script:
|
|||||||
- critical
|
- critical
|
||||||
variables:
|
variables:
|
||||||
voice: "{{ states('input_select.jarvis_voice') }}"
|
voice: "{{ states('input_select.jarvis_voice') }}"
|
||||||
|
groupname: >-
|
||||||
|
{% if who == 'kids_bedrooms' %}
|
||||||
|
kids_bedroom_speakers
|
||||||
|
{% elif who == 'all_bedrooms' %}
|
||||||
|
all_bedroom_speakers
|
||||||
|
{% elif who == 'basement' and is_state('input_boolean.studio_quiet','on') %}
|
||||||
|
alexa_no_basement
|
||||||
|
{% else %}
|
||||||
|
{{ who }}
|
||||||
|
{% endif %}
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: script.get_room_speakers
|
||||||
|
data:
|
||||||
|
room: "{{ who }}"
|
||||||
|
response_variable: "get_room_speakers"
|
||||||
|
- choose:
|
||||||
|
- conditions: "{{ who in ['everywhere','Everywhere'] }}"
|
||||||
|
sequence:
|
||||||
|
- service: script.get_all_speakers
|
||||||
|
response_variable: "get_all_speakers"
|
||||||
|
- conditions: "{{ get_room_speakers.jarvis_tts == 'group' }}"
|
||||||
|
sequence:
|
||||||
|
- service: script.get_group_speakers
|
||||||
|
data:
|
||||||
|
group: "{{ who }}"
|
||||||
|
response_variable: "get_group_speakers"
|
||||||
|
# Need to figure out whether to do this part here, or in alexa/jarvis voice scripts, or both
|
||||||
- service: mqtt.publish
|
- service: mqtt.publish
|
||||||
data:
|
data:
|
||||||
topic: 'house/polly/lastmsg'
|
topic: 'house/polly/lastmsg'
|
||||||
@ -1024,44 +1050,13 @@ script:
|
|||||||
- service: >-
|
- service: >-
|
||||||
{% if voice == 'nabu' %}
|
{% if voice == 'nabu' %}
|
||||||
script.nabu_voice
|
script.nabu_voice
|
||||||
{% elif who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room','Living Room Echo Dot','Living Room'] %}
|
{% elif get_room_services.jarvis_tts in ['group','alexa'] %}
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['kallen_bedroom','Kallen Bedroom'] %}
|
|
||||||
{% if is_state('input_boolean.kallen_sleeping','on') and type not in ['critical','Critical'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% else %}
|
|
||||||
script.jarvis_voice
|
|
||||||
{% endif %}
|
|
||||||
{% elif who in ['emma_bedroom','Emma Bedroom'] %}
|
|
||||||
{% if is_state('input_boolean.emma_sleeping','on') and type not in ['critical','Critical'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% else %}
|
|
||||||
script.jarvis_voice
|
|
||||||
{% endif %}
|
|
||||||
{% elif who in ['master_bedroom','master_bedroom_echo_dot','media_player.master_bedroom_echo_dot','Master Bedroom Echo Dot','Master Bedroom'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['kids_bedrooms','Kids Bedrooms'] %}
|
|
||||||
script.jarvis_voice
|
|
||||||
{% elif who in ['all_bedrooms','All Bedrooms'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['Basement','basement','basement_echo_dot','media_player.basement_echo_dot','Basement Echo Dot'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['Basement Google','basement_google'] %}
|
|
||||||
{% if is_state('input_boolean.studio_quiet','on') %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% else %}
|
|
||||||
script.jarvis_voice
|
|
||||||
{% endif %}
|
|
||||||
{% elif who in ['Common Areas','common','common_areas'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['alexa_everywhere','Alexa Everywhere'] %}
|
|
||||||
script.alexa_voice
|
|
||||||
{% elif who in ['Everywhere','everywhere'] %}
|
|
||||||
script.alexa_voice
|
script.alexa_voice
|
||||||
{% else %}
|
{% else %}
|
||||||
script.alexa_voice
|
script.jarvis_voice
|
||||||
{% endif %}
|
{% endif %}
|
||||||
data:
|
data:
|
||||||
|
# Work on where this redirect logic should go
|
||||||
who: >
|
who: >
|
||||||
{% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room','Living Room Echo Dot','Living Room'] %}
|
{% if who in ['living_room_echo_dot', 'media_player.living_room_echo_dot','living_room','Living Room Echo Dot','Living Room'] %}
|
||||||
living_room
|
living_room
|
||||||
@ -1138,7 +1133,7 @@ script:
|
|||||||
type: '{{ type }}'
|
type: '{{ type }}'
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ who in ['Everywhere','everywhere','all_bedrooms','All Bedrooms','kids_bedrooms','Kids Bedrooms'] }}"
|
value_template: "{{ get_room_speakers.jarvis_tts == 'group' and get_group_speakers.google is defined }}"
|
||||||
then:
|
then:
|
||||||
- service: script.jarvis_voice
|
- service: script.jarvis_voice
|
||||||
data:
|
data:
|
||||||
|
126
packages/variables.yaml
Normal file
126
packages/variables.yaml
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
script:
|
||||||
|
get_room_speakers:
|
||||||
|
alias: Get Room Speakers
|
||||||
|
sequence:
|
||||||
|
- variables:
|
||||||
|
room_services: >-
|
||||||
|
{% if room in areas() %}
|
||||||
|
{% set alexa_speaker = states.media_player |
|
||||||
|
selectattr('entity_id', 'in', area_entities(room)) |
|
||||||
|
rejectattr('attributes.last_called', 'undefined') |
|
||||||
|
selectattr('entity_id', 'search', 'echo_dot') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | first %}
|
||||||
|
|
||||||
|
{% set google_speaker = states.media_player |
|
||||||
|
selectattr('entity_id', 'in', area_entities(room)) |
|
||||||
|
rejectattr('attributes.device_class', 'undefined') |
|
||||||
|
selectattr('attributes.device_class', 'search', '(speaker)') |
|
||||||
|
selectattr('entity_id', 'search', 'google') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | first %}
|
||||||
|
|
||||||
|
{% set tts = "alexa" if alexa_speaker is defined else "google" %}
|
||||||
|
{% else %}
|
||||||
|
{% set tts = "group" %}
|
||||||
|
{% endif %}
|
||||||
|
{"area":"{{room}}","alexa_speaker":"{{alexa_speaker|default({}) }}","jarvis_tts":"{{tts|default("google") }}","google_speaker":"{{google_speaker|default({}) }}"}
|
||||||
|
- stop: "Services acquired"
|
||||||
|
response_variable: "get_room_speakers"
|
||||||
|
|
||||||
|
get_group_speakers:
|
||||||
|
alias: Get Group Speakers
|
||||||
|
sequence:
|
||||||
|
- variables:
|
||||||
|
get_group_speakers: >-
|
||||||
|
{% set speakers = expand('group.' + group) | map(attribute='entity_id') | list | join(',') %}
|
||||||
|
{% set alexa_speakers = expand('group.' + group) |
|
||||||
|
rejectattr('attributes.last_called', 'undefined') |
|
||||||
|
selectattr('entity_id', 'search', 'echo_dot') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | join(',') %}
|
||||||
|
{% set google_speakers = expand('group.' + group) |
|
||||||
|
rejectattr('attributes.device_class', 'undefined') |
|
||||||
|
selectattr('attributes.device_class', 'search', '(speaker)') |
|
||||||
|
selectattr('entity_id', 'search', 'google') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | join(',') %}
|
||||||
|
{"alexa":"{{alexa_speakers|default({})}}","google":"{{google_speakers|default({})}}"}
|
||||||
|
- stop: "Speakers acquired"
|
||||||
|
response_variable: "get_group_speakers"
|
||||||
|
|
||||||
|
get_echo_dots:
|
||||||
|
alias: Get Echo Dots
|
||||||
|
sequence:
|
||||||
|
- variables:
|
||||||
|
get_echo_dots: >-
|
||||||
|
{% if group is defined %}
|
||||||
|
{% set speakers = expand('group.' + group) %}
|
||||||
|
{% else %}
|
||||||
|
{% set speakers = states.media_player %}
|
||||||
|
{% endif %}
|
||||||
|
{% set echo_dots = speakers |
|
||||||
|
rejectattr('attributes.last_called', 'undefined') |
|
||||||
|
selectattr('entity_id', 'search', 'echo_dot') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | join(',') %}
|
||||||
|
{"speakers":"{{echo_dots}}"}
|
||||||
|
- stop: "Echo Dots acquired"
|
||||||
|
response_variable: "get_echo_dots"
|
||||||
|
|
||||||
|
get_google_speakers:
|
||||||
|
alias: Get Google Speakers
|
||||||
|
sequnce:
|
||||||
|
- variables:
|
||||||
|
get_google_speakers: >-
|
||||||
|
{% if group is defined %}
|
||||||
|
{% set speakers = expand('group.' + group) %}
|
||||||
|
{% else %}
|
||||||
|
{% set speakers = states.media_player %}
|
||||||
|
{% endif %}
|
||||||
|
{% set google_speaker = speakers |
|
||||||
|
rejectattr('attributes.device_class', 'undefined') |
|
||||||
|
selectattr('attributes.device_class', 'search', '(speaker)') |
|
||||||
|
selectattr('entity_id', 'search', 'google') |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | join(',') %}
|
||||||
|
{"speakers":"{{google_speaker}}"}
|
||||||
|
- stop: "Google speakers acquired"
|
||||||
|
response_variable: "get_google_speakers"
|
||||||
|
|
||||||
|
get_all_speakers:
|
||||||
|
alias: Get All Speakers
|
||||||
|
sequence:
|
||||||
|
- variables: >-
|
||||||
|
get_speakers:
|
||||||
|
{% set alexa_speaker = states.media_player |
|
||||||
|
rejectattr('attributes.last_called', 'undefined') |
|
||||||
|
selectattr('entity_id', 'search', 'echo_dot') |
|
||||||
|
map(attribute='entity_id')
|
||||||
|
%}
|
||||||
|
|
||||||
|
{% set google_speaker = states.media_player |
|
||||||
|
rejectattr('attributes.device_class', 'undefined') |
|
||||||
|
selectattr('attributes.device_class', 'search', '(speaker)') |
|
||||||
|
selectattr('entity_id', 'search', 'google') |
|
||||||
|
map(attribute='entity_id')
|
||||||
|
%}
|
||||||
|
{% set alexa_list = alexa_speaker | list | join(',') %}
|
||||||
|
{% set google_list = google_speaker | list | join(',') %}
|
||||||
|
{% set all_speakers = alexa_list + ',' + google_list %}
|
||||||
|
{"all_speakers":"{{all_speakers}}"}
|
||||||
|
|
||||||
|
get_room_lights:
|
||||||
|
alias: Get Room Lights
|
||||||
|
sequence:
|
||||||
|
- variables:
|
||||||
|
area: >
|
||||||
|
{{ room }}
|
||||||
|
entities: >
|
||||||
|
{% set lights = states.light |
|
||||||
|
selectattr('entity_id', 'in', area_entities(area)) |
|
||||||
|
map(attribute='entity_id') |
|
||||||
|
list | join(',') %}
|
||||||
|
{"lights":"{{lights}}"}
|
||||||
|
- stop: "Lights acquired"
|
||||||
|
response_variable: "entities"
|
544
scripts.yaml
544
scripts.yaml
@ -199,11 +199,18 @@ going_upstairs:
|
|||||||
then:
|
then:
|
||||||
- alias: Decide basement studio heater action
|
- alias: Decide basement studio heater action
|
||||||
if:
|
if:
|
||||||
- condition: numeric_state
|
- alias: If temp below freezing and heat is on
|
||||||
entity_id: weather.iron_nerd_weather_station
|
condition: and
|
||||||
attribute: temperature
|
conditions:
|
||||||
below: 32
|
- condition: numeric_state
|
||||||
alias: Temperature below freezing
|
entity_id: weather.iron_nerd_weather_station
|
||||||
|
attribute: temperature
|
||||||
|
below: 32
|
||||||
|
alias: Temperature below freezing
|
||||||
|
- condition: state
|
||||||
|
entity_id: climate.basement_studio_vtherm
|
||||||
|
state: heat
|
||||||
|
alias: Heat on
|
||||||
then:
|
then:
|
||||||
- action: climate.set_preset_mode
|
- action: climate.set_preset_mode
|
||||||
metadata: {}
|
metadata: {}
|
||||||
@ -1656,47 +1663,113 @@ tony_morning_meds:
|
|||||||
tag: tony-morning-meds
|
tag: tony-morning-meds
|
||||||
alias: Clear previous morning notification
|
alias: Clear previous morning notification
|
||||||
action: script.text_notify
|
action: script.text_notify
|
||||||
- delay:
|
- alias: Send notifications, using AI if internet is connected
|
||||||
hours: 0
|
if:
|
||||||
minutes: 0
|
- condition: state
|
||||||
seconds: 5
|
entity_id: binary_sensor.internet
|
||||||
milliseconds: 0
|
state: 'on'
|
||||||
- alias: Send morning notifications via text, and TTS if needed
|
then:
|
||||||
parallel:
|
- alias: Generate reminder, be snarky if it's been several times
|
||||||
- alias: Send text notification
|
|
||||||
data:
|
|
||||||
who: tony
|
|
||||||
type: alert
|
|
||||||
title: Morning Meds
|
|
||||||
message: You need to take your morning meds
|
|
||||||
tag: tony-morning-meds
|
|
||||||
actions:
|
|
||||||
- action: TONY_MORNING_MEDS_TAKEN
|
|
||||||
title: Taken
|
|
||||||
- action: TONY_MORNING_MEDS_SKIPPED
|
|
||||||
title: Skip
|
|
||||||
action: script.text_notify
|
|
||||||
- alias: Send TTS if reminders > 2 and Tony is home
|
|
||||||
if:
|
if:
|
||||||
- alias: If reminders > 2 and Tony is home
|
- condition: numeric_state
|
||||||
condition: and
|
entity_id: counter.tony_morning_meds_reminder_count
|
||||||
conditions:
|
above: 2
|
||||||
- condition: numeric_state
|
|
||||||
entity_id: counter.tony_morning_meds_reminder_count
|
|
||||||
above: 2
|
|
||||||
alias: When reminder count > 2
|
|
||||||
- condition: state
|
|
||||||
entity_id: person.tony_stork
|
|
||||||
state: home
|
|
||||||
alias: If Tony is home
|
|
||||||
then:
|
then:
|
||||||
- data:
|
- action: google_generative_ai_conversation.generate_content
|
||||||
who: common_areas
|
metadata: {}
|
||||||
|
data:
|
||||||
|
prompt: Remind Tony to take his morning meds. Use a maximum of two lines.
|
||||||
|
Be snarky, because at this point he's been reminded multiple times.
|
||||||
|
response_variable: response
|
||||||
|
alias: Generate snarky reminder
|
||||||
|
else:
|
||||||
|
- action: google_generative_ai_conversation.generate_content
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
prompt: Remind Tony to take his morning meds. Use a maximum of two lines.
|
||||||
|
response_variable: response
|
||||||
|
alias: Generate reminder
|
||||||
|
- delay:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: 5
|
||||||
|
milliseconds: 0
|
||||||
|
- alias: Send morning notifications via text, and TTS if needed
|
||||||
|
parallel:
|
||||||
|
- alias: Send text notification
|
||||||
|
data:
|
||||||
|
who: tony
|
||||||
type: alert
|
type: alert
|
||||||
message: Tony, you need to take your morning meds. This is reminder number
|
title: Morning Meds
|
||||||
{{ states('counter.tony_morning_meds_reminder_count') }} for today.
|
message: '{{ response.text }}'
|
||||||
alias: Send TTS notification
|
tag: tony-morning-meds
|
||||||
action: script.speech_engine
|
actions:
|
||||||
|
- action: TONY_MORNING_MEDS_TAKEN
|
||||||
|
title: Taken
|
||||||
|
- action: TONY_MORNING_MEDS_SKIPPED
|
||||||
|
title: Skip
|
||||||
|
action: script.text_notify
|
||||||
|
- alias: Send TTS if reminders > 2 and Tony is home
|
||||||
|
if:
|
||||||
|
- alias: When reminders > 2 and Tony is home
|
||||||
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: numeric_state
|
||||||
|
entity_id: counter.tony_morning_meds_reminder_count
|
||||||
|
above: 2
|
||||||
|
alias: When reminder count > 2
|
||||||
|
- condition: state
|
||||||
|
entity_id: person.tony_stork
|
||||||
|
state: home
|
||||||
|
alias: If Tony is home
|
||||||
|
then:
|
||||||
|
- data:
|
||||||
|
who: common_areas
|
||||||
|
type: alert
|
||||||
|
message: '{{ response.text }}'
|
||||||
|
alias: Send TTS notification
|
||||||
|
action: script.speech_engine
|
||||||
|
else:
|
||||||
|
- delay:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: 5
|
||||||
|
milliseconds: 0
|
||||||
|
- alias: Send morning notifications via text, and TTS if needed
|
||||||
|
parallel:
|
||||||
|
- alias: Send text notification
|
||||||
|
data:
|
||||||
|
who: tony
|
||||||
|
type: alert
|
||||||
|
title: Morning Meds
|
||||||
|
tag: tony-morning-meds
|
||||||
|
actions:
|
||||||
|
- action: TONY_MORNING_MEDS_TAKEN
|
||||||
|
title: Taken
|
||||||
|
- action: TONY_MORNING_MEDS_SKIPPED
|
||||||
|
title: Skip
|
||||||
|
message: You need to take your morning meds
|
||||||
|
action: script.text_notify
|
||||||
|
- alias: Send TTS if reminders > 2 and Tony is home
|
||||||
|
if:
|
||||||
|
- alias: When reminders > 2 and Tony is home
|
||||||
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: numeric_state
|
||||||
|
entity_id: counter.tony_morning_meds_reminder_count
|
||||||
|
above: 2
|
||||||
|
alias: When reminder count > 2
|
||||||
|
- condition: state
|
||||||
|
entity_id: person.tony_stork
|
||||||
|
state: home
|
||||||
|
alias: If Tony is home
|
||||||
|
then:
|
||||||
|
- alias: Send TTS notification
|
||||||
|
data:
|
||||||
|
who: common_areas
|
||||||
|
type: alert
|
||||||
|
message: Tony, you need to take your morning meds
|
||||||
|
action: script.speech_engine
|
||||||
tony_night_meds:
|
tony_night_meds:
|
||||||
alias: Tony Night Meds
|
alias: Tony Night Meds
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
@ -1897,47 +1970,113 @@ tony_afternoon_meds:
|
|||||||
tag: tony-afternoon-meds
|
tag: tony-afternoon-meds
|
||||||
alias: Clear previous afternoon notification
|
alias: Clear previous afternoon notification
|
||||||
action: script.text_notify
|
action: script.text_notify
|
||||||
- delay:
|
- alias: Send notifications, using AI if internet is connected
|
||||||
hours: 0
|
if:
|
||||||
minutes: 0
|
- condition: state
|
||||||
seconds: 5
|
entity_id: binary_sensor.internet
|
||||||
milliseconds: 0
|
state: 'on'
|
||||||
- alias: Send afternoon notifications via text, and TTS if needed
|
then:
|
||||||
parallel:
|
- alias: Generate reminder, be snarky if it's been several times
|
||||||
- alias: Send text notification
|
|
||||||
data:
|
|
||||||
who: tony
|
|
||||||
type: alert
|
|
||||||
title: Afternoon Meds
|
|
||||||
message: You need to take your afternoon meds
|
|
||||||
tag: tony-afternoon-meds
|
|
||||||
actions:
|
|
||||||
- action: TONY_AFTERNOON_MEDS_TAKEN
|
|
||||||
title: Taken
|
|
||||||
- action: TONY_AFTERNOON_MEDS_SKIPPED
|
|
||||||
title: Skip
|
|
||||||
action: script.text_notify
|
|
||||||
- alias: Send TTS if reminders > 2 and Tony is home
|
|
||||||
if:
|
if:
|
||||||
- alias: When reminders > 2 and Tony is home
|
- condition: numeric_state
|
||||||
condition: and
|
entity_id: counter.tony_afternoon_meds_reminder_count
|
||||||
conditions:
|
above: 2
|
||||||
- condition: numeric_state
|
|
||||||
entity_id: counter.tony_afternoon_meds_reminder_count
|
|
||||||
above: 2
|
|
||||||
alias: When reminder count > 2
|
|
||||||
- condition: state
|
|
||||||
entity_id: person.tony_stork
|
|
||||||
state: home
|
|
||||||
alias: If Tony is home
|
|
||||||
then:
|
then:
|
||||||
- data:
|
- action: google_generative_ai_conversation.generate_content
|
||||||
who: common_areas
|
metadata: {}
|
||||||
|
data:
|
||||||
|
prompt: Remind Tony to take his afternoon meds. Use a maximum of two lines.
|
||||||
|
Be snarky, because at this point he's been reminded multiple times.
|
||||||
|
response_variable: response
|
||||||
|
alias: Generate snarky reminder
|
||||||
|
else:
|
||||||
|
- action: google_generative_ai_conversation.generate_content
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
prompt: Remind Tony to take his afternoon meds. Use a maximum of two lines.
|
||||||
|
response_variable: response
|
||||||
|
alias: Generate reminder
|
||||||
|
- delay:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: 5
|
||||||
|
milliseconds: 0
|
||||||
|
- alias: Send afternoon notifications via text, and TTS if needed
|
||||||
|
parallel:
|
||||||
|
- alias: Send text notification
|
||||||
|
data:
|
||||||
|
who: tony
|
||||||
type: alert
|
type: alert
|
||||||
message: Tony, you need to take your afternoon meds. This is reminder number
|
title: Afternoon Meds
|
||||||
{{ states('counter.tony_afternoon_meds_reminder_count') }} for today.
|
message: '{{ response.text }}'
|
||||||
alias: Send TTS notification
|
tag: tony-afternoon-meds
|
||||||
action: script.speech_engine
|
actions:
|
||||||
|
- action: TONY_AFTERNOON_MEDS_TAKEN
|
||||||
|
title: Taken
|
||||||
|
- action: TONY_AFTERNOON_MEDS_SKIPPED
|
||||||
|
title: Skip
|
||||||
|
action: script.text_notify
|
||||||
|
- alias: Send TTS if reminders > 2 and Tony is home
|
||||||
|
if:
|
||||||
|
- alias: When reminders > 2 and Tony is home
|
||||||
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: numeric_state
|
||||||
|
entity_id: counter.tony_afternoon_meds_reminder_count
|
||||||
|
above: 2
|
||||||
|
alias: When reminder count > 2
|
||||||
|
- condition: state
|
||||||
|
entity_id: person.tony_stork
|
||||||
|
state: home
|
||||||
|
alias: If Tony is home
|
||||||
|
then:
|
||||||
|
- data:
|
||||||
|
who: common_areas
|
||||||
|
type: alert
|
||||||
|
message: '{{ response.text }}'
|
||||||
|
alias: Send TTS notification
|
||||||
|
action: script.speech_engine
|
||||||
|
else:
|
||||||
|
- delay:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: 5
|
||||||
|
milliseconds: 0
|
||||||
|
- alias: Send afternoon notifications via text, and TTS if needed
|
||||||
|
parallel:
|
||||||
|
- alias: Send text notification
|
||||||
|
data:
|
||||||
|
who: tony
|
||||||
|
type: alert
|
||||||
|
title: Afternoon Meds
|
||||||
|
tag: tony-afternoon-meds
|
||||||
|
actions:
|
||||||
|
- action: TONY_AFTERNOON_MEDS_TAKEN
|
||||||
|
title: Taken
|
||||||
|
- action: TONY_AFTERNOON_MEDS_SKIPPED
|
||||||
|
title: Skip
|
||||||
|
message: You need to take your afternoon meds
|
||||||
|
action: script.text_notify
|
||||||
|
- alias: Send TTS if reminders > 2 and Tony is home
|
||||||
|
if:
|
||||||
|
- alias: When reminders > 2 and Tony is home
|
||||||
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: numeric_state
|
||||||
|
entity_id: counter.tony_afternoon_meds_reminder_count
|
||||||
|
above: 2
|
||||||
|
alias: When reminder count > 2
|
||||||
|
- condition: state
|
||||||
|
entity_id: person.tony_stork
|
||||||
|
state: home
|
||||||
|
alias: If Tony is home
|
||||||
|
then:
|
||||||
|
- alias: Send TTS notification
|
||||||
|
data:
|
||||||
|
who: common_areas
|
||||||
|
type: alert
|
||||||
|
message: Tony, you need to take your afternoon meds
|
||||||
|
action: script.speech_engine
|
||||||
tony_ibuprofen:
|
tony_ibuprofen:
|
||||||
alias: Tony Ibuprofen
|
alias: Tony Ibuprofen
|
||||||
sequence:
|
sequence:
|
||||||
@ -2301,56 +2440,37 @@ tony_tylenol:
|
|||||||
kallen_morning_meds:
|
kallen_morning_meds:
|
||||||
alias: Kallen Morning Meds
|
alias: Kallen Morning Meds
|
||||||
sequence:
|
sequence:
|
||||||
- service: counter.increment
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: counter.kallen_morning_meds_reminder_count
|
entity_id: counter.kallen_morning_meds_reminder_count
|
||||||
alias: Increment morning reminder counter
|
alias: Increment morning reminder counter
|
||||||
- alias: Clear previous morning notifications
|
action: counter.increment
|
||||||
parallel:
|
- alias: Clear previous text notifications
|
||||||
- service: script.text_notify
|
data:
|
||||||
data:
|
type: alert
|
||||||
type: alert
|
who: all
|
||||||
who: parents
|
message: clear_notification
|
||||||
message: clear_notification
|
tag: kallen-morning-meds
|
||||||
tag: kallen-morning-meds-parents
|
action: script.text_notify
|
||||||
alias: Clear for parents
|
|
||||||
- service: script.text_notify
|
|
||||||
data:
|
|
||||||
type: alert
|
|
||||||
who: kallen
|
|
||||||
message: clear_notification
|
|
||||||
tag: kallen-morning-meds-self
|
|
||||||
alias: Clear for Kallen
|
|
||||||
- delay:
|
- delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 0
|
minutes: 0
|
||||||
seconds: 5
|
seconds: 5
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- alias: Send text notifications
|
- alias: Send text notification
|
||||||
parallel:
|
data:
|
||||||
- alias: Send to parents
|
who: all
|
||||||
service: script.text_notify
|
type: alert
|
||||||
data:
|
title: Morning Meds
|
||||||
who: parents
|
message: Kallen needs to take his morning meds
|
||||||
type: alert
|
tag: kallen-morning-meds
|
||||||
title: Morning Meds
|
actions:
|
||||||
message: Kallen needs to take his morning meds
|
- action: KALLEN_MORNING_MEDS_TAKEN
|
||||||
tag: kallen-morning-meds-parents
|
title: Taken
|
||||||
actions:
|
- action: KALLEN_MORNING_MEDS_SKIPPED
|
||||||
- action: KALLEN_MORNING_MEDS_TAKEN
|
title: Skip
|
||||||
title: Taken
|
action: script.text_notify
|
||||||
- action: KALLEN_MORNING_MEDS_SKIPPED
|
|
||||||
title: Skip
|
|
||||||
- service: script.text_notify
|
|
||||||
data:
|
|
||||||
who: kallen
|
|
||||||
type: alert
|
|
||||||
title: Morning Meds
|
|
||||||
message: You need to take your morning meds. Go to mom or dad to confirm.
|
|
||||||
tag: kallen-morning-meds-self
|
|
||||||
alias: Send to Kallen
|
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
mode: restart
|
mode: restart
|
||||||
kallen_night_meds:
|
kallen_night_meds:
|
||||||
@ -2922,75 +3042,163 @@ tina_morning_meds:
|
|||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
mode: restart
|
mode: restart
|
||||||
sequence:
|
sequence:
|
||||||
- service: counter.increment
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: counter.tina_morning_meds_reminder_count
|
entity_id: counter.tina_morning_meds_reminder_count
|
||||||
alias: Increment morning reminder counter
|
alias: Increment morning reminder counter
|
||||||
- service: script.text_notify
|
action: counter.increment
|
||||||
data:
|
- data:
|
||||||
type: alert
|
type: alert
|
||||||
who: tina
|
who: tina
|
||||||
message: clear_notification
|
message: clear_notification
|
||||||
tag: tina-morning-meds
|
tag: tina-morning-meds
|
||||||
alias: Clear previous morning notification
|
alias: Clear previous morning notification
|
||||||
- delay:
|
action: script.text_notify
|
||||||
hours: 0
|
- alias: Send notifications, using AI if internet is connected
|
||||||
minutes: 0
|
if:
|
||||||
seconds: 5
|
- condition: state
|
||||||
milliseconds: 0
|
entity_id: binary_sensor.internet
|
||||||
- alias: Send text notification
|
state: 'on'
|
||||||
service: script.text_notify
|
then:
|
||||||
data:
|
- if:
|
||||||
who: tina
|
- condition: numeric_state
|
||||||
type: alert
|
entity_id: counter.tina_morning_meds_reminder_count
|
||||||
title: Morning Meds
|
above: 2
|
||||||
message: You need to take your morning meds
|
then:
|
||||||
tag: tina-morning-meds
|
- action: google_generative_ai_conversation.generate_content
|
||||||
actions:
|
metadata: {}
|
||||||
- action: TINA_MORNING_MEDS_TAKEN
|
data:
|
||||||
title: Taken
|
prompt: Remind Tina to take her morning meds. Use a maximum of two lines.
|
||||||
- action: TINA_MORNING_MEDS_SKIPPED
|
Be snarky, because at this point she's been reminded multiple times.
|
||||||
title: Skip
|
response_variable: response
|
||||||
description: ''
|
alias: Generate snarky reminder
|
||||||
|
else:
|
||||||
|
- action: google_generative_ai_conversation.generate_content
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
prompt: Remind Tina to take her morning meds. Use a maximum of two lines.
|
||||||
|
response_variable: response
|
||||||
|
alias: Generate reminder
|
||||||
|
alias: Generate reminder, be snarky if it's been several times
|
||||||
|
- delay:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: 5
|
||||||
|
milliseconds: 0
|
||||||
|
- alias: Send text notification
|
||||||
|
data:
|
||||||
|
who: tina
|
||||||
|
type: alert
|
||||||
|
title: Morning Meds
|
||||||
|
message: '{{ response.text }}'
|
||||||
|
tag: tina-morning-meds
|
||||||
|
actions:
|
||||||
|
- action: TINA_MORNING_MEDS_TAKEN
|
||||||
|
title: Taken
|
||||||
|
- action: TINA_MORNING_MEDS_SKIPPED
|
||||||
|
title: Skip
|
||||||
|
action: script.text_notify
|
||||||
|
else:
|
||||||
|
- delay:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: 5
|
||||||
|
milliseconds: 0
|
||||||
|
- alias: Send text notification
|
||||||
|
data:
|
||||||
|
who: tina
|
||||||
|
type: alert
|
||||||
|
title: Morning Meds
|
||||||
|
tag: tina-morning-meds
|
||||||
|
actions:
|
||||||
|
- action: TINA_MORNING_MEDS_TAKEN
|
||||||
|
title: Taken
|
||||||
|
- action: TINA_MORNING_MEDS_SKIPPED
|
||||||
|
title: Skip
|
||||||
|
message: You need to take your morning meds
|
||||||
|
action: script.text_notify
|
||||||
tina_night_meds:
|
tina_night_meds:
|
||||||
alias: Tina Night Meds
|
alias: Tina Night Meds
|
||||||
icon: mdi:medication
|
icon: mdi:medication
|
||||||
mode: restart
|
mode: restart
|
||||||
sequence:
|
sequence:
|
||||||
- service: counter.increment
|
- metadata: {}
|
||||||
metadata: {}
|
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: counter.tina_night_meds_reminder_count
|
entity_id: counter.tina_night_meds_reminder_count
|
||||||
alias: Increment night reminder counter
|
alias: Increment night reminder counter
|
||||||
- service: script.text_notify
|
action: counter.increment
|
||||||
data:
|
- data:
|
||||||
type: alert
|
type: alert
|
||||||
who: tina
|
who: tina
|
||||||
message: clear_notification
|
message: clear_notification
|
||||||
tag: tina-night-meds
|
tag: tina-night-meds
|
||||||
alias: Clear previous night notification
|
alias: Clear previous night notification
|
||||||
- delay:
|
action: script.text_notify
|
||||||
hours: 0
|
- alias: Send notifications, using AI if internet is connected
|
||||||
minutes: 0
|
if:
|
||||||
seconds: 5
|
- condition: state
|
||||||
milliseconds: 0
|
entity_id: binary_sensor.internet
|
||||||
- alias: Send text notification
|
state: 'on'
|
||||||
service: script.text_notify
|
then:
|
||||||
data:
|
- if:
|
||||||
who: tina
|
- condition: numeric_state
|
||||||
type: alert
|
entity_id: counter.tina_night_meds_reminder_count
|
||||||
title: Night Meds
|
above: 2
|
||||||
message: You need to take your night meds
|
then:
|
||||||
tag: tina-night-meds
|
- action: google_generative_ai_conversation.generate_content
|
||||||
actions:
|
metadata: {}
|
||||||
- action: TINA_NIGHT_MEDS_TAKEN
|
data:
|
||||||
title: Taken
|
prompt: Remind Tina to take her night meds. Use a maximum of two lines.
|
||||||
- action: TINA_NIGHT_MEDS_SKIPPED
|
Be snarky, because at this point she's been reminded multiple times.
|
||||||
title: Skip
|
response_variable: response
|
||||||
description: ''
|
alias: Generate snarky reminder
|
||||||
|
else:
|
||||||
|
- action: google_generative_ai_conversation.generate_content
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
prompt: Remind Tina to take her night meds. Use a maximum of two lines.
|
||||||
|
response_variable: response
|
||||||
|
alias: Generate reminder
|
||||||
|
alias: Generate reminder, be snarky if it's been several times
|
||||||
|
- delay:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: 5
|
||||||
|
milliseconds: 0
|
||||||
|
- alias: Send text notification
|
||||||
|
data:
|
||||||
|
who: tina
|
||||||
|
type: alert
|
||||||
|
title: Night Meds
|
||||||
|
message: '{{ response.text }}'
|
||||||
|
tag: tina-night-meds
|
||||||
|
actions:
|
||||||
|
- action: TINA_NIGHT_MEDS_TAKEN
|
||||||
|
title: Taken
|
||||||
|
- action: TINA_NIGHT_MEDS_SKIPPED
|
||||||
|
title: Skip
|
||||||
|
action: script.text_notify
|
||||||
|
else:
|
||||||
|
- delay:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: 5
|
||||||
|
milliseconds: 0
|
||||||
|
- alias: Send text notification
|
||||||
|
data:
|
||||||
|
who: tina
|
||||||
|
type: alert
|
||||||
|
title: Night Meds
|
||||||
|
tag: tina-night-meds
|
||||||
|
actions:
|
||||||
|
- action: TINA_NIGHT_MEDS_TAKEN
|
||||||
|
title: Taken
|
||||||
|
- action: TINA_NIGHT_MEDS_SKIPPED
|
||||||
|
title: Skip
|
||||||
|
message: You need to take your night meds
|
||||||
|
action: script.text_notify
|
||||||
tina_ibuprofen:
|
tina_ibuprofen:
|
||||||
sequence:
|
sequence:
|
||||||
- alias: Turn off boolean if this is a notification
|
- alias: Turn off boolean if this is a notification
|
||||||
|
@ -75,28 +75,26 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% if (states('sensor.climate_devices_installed') | int) > 0 %}
|
{% if (states('sensor.climate_devices_installed') | int) > 0 %}
|
||||||
{% if is_state('input_boolean.master_bedroom_aircon_installed','on') %}
|
{% if is_state('input_boolean.master_bedroom_aircon_installed','on') %}
|
||||||
"the master bedroom temperature is {{ states('sensor.master_bedroom_aircon_indoor_temperature') | int }} degrees. "
|
"the master bedroom temperature is {{ states('sensor.master_bedroom_temperature') | int }} degrees. "
|
||||||
{% if not is_state('climate.master_bedroom_aircon','off') %}
|
{% if not is_state('climate.master_bedroom_aircon','off') %}
|
||||||
{% if is_state('climate.master_bedroom_aircon','cool') %}
|
{% if is_state('climate.master_bedroom_aircon','cool') %}
|
||||||
"and the master bedroom air conditioner is set for cooling to {{ state_attr('climate.master_bedroom_aircon','temperature') }} degrees. "
|
"and the master bedroom air conditioner is set for cooling to {{ state_attr('climate.master_bedroom_aircon','temperature') }} degrees. "
|
||||||
{% elif is_state('climate.master_bedroom_aircon','fan_only') %}
|
{% elif is_state('climate.master_bedroom_aircon','fan_only') %}
|
||||||
"and the master bedroom air conditioner is in fan only mode. "
|
"and the master bedroom air conditioner is in fan only mode. "
|
||||||
{% elif is_state('climate.master_bedroom_aircon','dry') %}
|
{% elif is_state('climate.master_bedroom_aircon','dry') %}
|
||||||
"and the master bedroom air conditioner is moonlighting as a dehumidifier. "
|
"and the master bedroom air conditioner is moonlighting as a dehumidifier. "
|
||||||
{% elif is_state('climate.master_bedroom_aircon','auto') %}
|
{% elif is_state('climate.master_bedroom_aircon','auto') %}
|
||||||
"and the master bedroom air conditioner is making its own decisions. Be afraid, be very afraid. "
|
"and the master bedroom air conditioner is making its own decisions. Be afraid, be very afraid. "
|
||||||
{% else %}
|
{% else %}
|
||||||
"and the master bedroom air conditioner is currently not speaking to me. Was it something I said? "
|
"and the master bedroom air conditioner is currently not speaking to me. Was it something I said? "
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.master_bedroom_aircon_installed','off') %}
|
{% endif %}
|
||||||
"There is no air conditioner or temperature sensor installed in the master bedroom. "
|
|
||||||
{% endif %}
|
|
||||||
{% if is_state('input_boolean.emma_bedroom_aircon_installed','on') and is_state('fan.emma_air_conditioner','on') %}
|
|
||||||
"Emma's air conditioner is {{ states('fan.emma_air_conditioner') }}. "
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if is_state('input_boolean.emma_bedroom_aircon_installed','on') and is_state('fan.emma_air_conditioner','on') %}
|
||||||
|
"Emma's air conditioner is {{ states('fan.emma_air_conditioner') }}. "
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
Reference in New Issue
Block a user