mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-11-07 01:52:11 +00:00
More organization of the Speech stuff.
This commit is contained in:
30
automation/Speech/announcements.yaml
Executable file
30
automation/Speech/announcements.yaml
Executable file
@@ -0,0 +1,30 @@
|
||||
######################################################################
|
||||
## Announce when people come or go.
|
||||
## Announce over all Chromecast Audios
|
||||
######################################################################
|
||||
- alias: 'State Announcements'
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- device_tracker.carlo
|
||||
- device_tracker.stacey
|
||||
- device_tracker.franco
|
||||
- device_tracker.yolanda
|
||||
- device_tracker.joyce_ipad
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
for: '00:02:00'
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- cover.garadget_large
|
||||
- cover.garadget_small
|
||||
from: 'closed'
|
||||
to: 'open'
|
||||
for: '00:02:00'
|
||||
|
||||
action:
|
||||
- service: script.Voice_notify
|
||||
data_template:
|
||||
value1: "{{ trigger.entity_id.split('.')[1]|replace('_', ' ')|replace('garadget large', 'The large garage ')|replace('garadget small', 'The small garage ') }} is {{ (trigger.to_state.state)|replace('_', ' ') }}."
|
||||
41
automation/Speech/home_today.yaml
Executable file
41
automation/Speech/home_today.yaml
Executable file
@@ -0,0 +1,41 @@
|
||||
######################################################################
|
||||
## Some home facts when we get back home from being away.
|
||||
######################################################################
|
||||
- alias: 'Home Stats'
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- group.family
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
for: '00:03:00'
|
||||
|
||||
action:
|
||||
- service: script.Voice_notify
|
||||
data_template:
|
||||
value1: >
|
||||
"Welcome Home {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }}. Here is what's going on around the house right now:
|
||||
{%if now().strftime("%a") == 'Wed' or now().strftime("%a") == 'Sun'%}
|
||||
Today is {{now().strftime("%A")}} and {{now().strftime("%A")}} is garbage day. Please be sure to tell the kids to take out the trash.
|
||||
{%endif%}
|
||||
Inside the house, it is {{ states.climate.downstairs.attributes["current_temperature"]}} degrees with around {{states('sensor.downstairs_thermostat_humidity')}} percent humidity. Outside, it is going to be {{states('sensor.dark_sky_minutely_summary')}}
|
||||
{% if is_state('cover.garadget_large', 'open') -%}
|
||||
Also, The Large Garage Door is still open
|
||||
{% endif -%}
|
||||
{% if is_state('cover.garadget_small', 'open') -%}
|
||||
{% if is_state('cover.garadget_large', 'open') -%}and
|
||||
{%- endif %} The small Garage Door is still open.
|
||||
{% endif %}
|
||||
. There are
|
||||
{% for state in states.light if state.state == 'on' -%}
|
||||
{%- if loop.last -%}
|
||||
{{ loop.index }}
|
||||
{%- endif -%}
|
||||
{%- endfor %} lights on right now."
|
||||
{% set comma = joiner(', ') %} The
|
||||
{% for group in states.group|groupby('state') -%}
|
||||
{%- for entity in group.list if entity.state == 'on' and entity.name.split(' ')[1]|lower == 'lights' and entity.name.split(' ')[0]|lower != 'all' and entity.name.split(' ')[0]|lower != 'interior' -%}
|
||||
{{ comma() }}{{ entity.name }}
|
||||
{%- endfor -%}
|
||||
{%- endfor %}.
|
||||
18
automation/Speech/nest.yaml
Executable file
18
automation/Speech/nest.yaml
Executable file
@@ -0,0 +1,18 @@
|
||||
######################################################################
|
||||
## Announce when one of the nests kick in
|
||||
## Announce over all Chromecast Audios
|
||||
######################################################################
|
||||
- alias: 'Nest Status'
|
||||
|
||||
trigger:
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- sensor.downstairs_thermostat_hvac_state
|
||||
- sensor.upstairs_thermostat_hvac_state
|
||||
from: 'off'
|
||||
|
||||
action:
|
||||
- service: script.Voice_notify
|
||||
data_template:
|
||||
value1: "The {{ trigger.entity_id.split('.')[1].split('_')[0]}} {{ trigger.entity_id.split('.')[1].split('_')[1]}} has now been turned on for {{(trigger.to_state.state)}}."
|
||||
15
automation/Speech/tts_repeat.yaml
Executable file
15
automation/Speech/tts_repeat.yaml
Executable file
@@ -0,0 +1,15 @@
|
||||
######################################################################
|
||||
## What did she say? REPEAT THE LAST MESSAGE.
|
||||
######################################################################
|
||||
- alias: 'tts_repeat'
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.last_message
|
||||
state: 'on'
|
||||
from: 'off'
|
||||
|
||||
action:
|
||||
- service: script.Voice_notify
|
||||
data_template:
|
||||
value1: "{{states('sensor.polly_lastmsg')}}"
|
||||
Reference in New Issue
Block a user