Thanks! Tested that! Trace is here: CodePile | Easily Share Piles of Code
Similar outcome as 2.2.1.
My automation(s) run the following:
service: script.turn_on
target:
entity_id: script.google_home_resume
data:
variables:
action:
- service: script.test_for_tts
target:
entity_id: media_player.all_speakers
data:
entity: media_player.all_speakers
extra:
volume: 0.5
Theyâll call my the script.test_for_tts
(which isnât perfect yet, but still) that supplies for the TTS messages based on TOD and some other factors (I guess you now know how we try to run the household ). Since I have other automations (with similar script calls) for other TTS announcements (on different speakers, so it doesnât wake me up when the wife gets to work on my day off), they will use different TTS scripts that are called in a similar manner as above.
alias: Informational TTS Announcements
sequence:
- service: tts.cloud_say
data:
entity_id: '{{ entity }}'
message: >
{% if now().strftime("%H")|int < 12 %} Good morning, today is
{{states.sensor.full_date.state}}, and the time is
{{states.sensor.time.state}}. It's currently
{{states.sensor.openweathermap_temperature.state|round(1)}} degrees in
Woonplaats, but feels like
{{states.sensor.openweathermap_feels_like_temperature.state|round(1)}}
degrees. The weather is currently
{{states.sensor.openweathermap_condition.state}}, later it's expected to
be {{states.sensor.openweathermap_forecast_condition.state}}.The
temperature today will be between
{{states.sensor.openweathermap_forecast_temperature_low.state|round(1)}}
and {{states.sensor.openweathermap_forecast_temperature.state|round(1)}}
degrees.
{% elif now().strftime("%H")|int < 18 %} Good afternoon, welcome home.
Today is {{states.sensor.full_date.state}}, and the time is
{{states.sensor.time.state}}.
{% elif now().strftime("%H")|int < 18 %} Good afternoon, welcome home.
Today is {{states.sensor.full_date.state}}, and the time is
{{states.sensor.time.state}}.
{% elif now().strftime("%H")|int < 22 %} Good evening, welcome home.
Today is {{states.sensor.full_date.state}}, and the time is
{{states.sensor.time.state}}.
{% elif now().strftime("%H")|int < 22 %} Good evening, welcome home.
Today is {{states.sensor.full_date.state}}, and the time is
{{states.sensor.time.state}}.
{% else %} Good night, welcome home. {% endif %}
{% if now().strftime("%H")|int > 12 and now().strftime("%H")|int < 18
and is_state('input_boolean.house_is_vacuumed_today', 'on') %} George
has cleaned the house in your absence, so the downstairs floor should be
clean.
{% elif now().strftime("%H")|int > 12 and now().strftime("%H")|int < 18
and is_state('input_boolean.house_is_vacuumed_today', 'off') and
is_state('sensor.vacuum_status', '6') %} George hasn't been asked to, so
unfortunately the house has not been cleaned in your absence.
{% elif now().strftime("%H")|int > 18 and now().strftime("%H")|int < 22
and is_state('input_boolean.house_is_vacuumed_today', 'off') and
is_state('sensor.vacuum_status', '6') %} George hasn't been asked to, so
unfortunately the house has not been cleaned in your absence.
{% elif now().strftime("%H")|int > 12 and now().strftime("%H")|int < 18
and is_state('input_boolean.house_is_vacuumed_today', 'off') and
is_state('sensor.vacuum_status', '4') %} George has been asked to clean
the house but ran into an obstacle, so unfortunately the house has not
been cleaned in your absence.
{% elif now().strftime("%H")|int > 18 and now().strftime("%H")|int < 22
and is_state('input_boolean.house_is_vacuumed_today', 'off') and
is_state('sensor.vacuum_status', '4') %} George has been asked to clean
the house but ran into an obstacle, so unfortunately the house has not
been cleaned in your absence.
{% elif now().strftime("%H")|int > 18 and now().strftime("%H")|int < 22
and is_state('input_boolean.house_is_vacuumed_today', 'on') %} George
has cleaned the house in your absence, so the downstairs floor should be
clean.
{% else %}{% endif %}
{% if states('sensor.vacuum_dustbin_days_since_last_emptied')|int >= 4 %} Please empty the Robot Vacuum Cleaner Dustbin, as George will otherwise not be able to clean today.
{% elif states('sensor.vacuum_dustbin_days_since_last_emptied')|int < 4 %}
{% elif states('sensor.vacuum_dustbin_days_since_last_emptied')|int <= 4 %} Please empty the Robot Vacuum Cleaner Dustbin, as George will otherwise not be able to clean tomorrow.
{% else %}{% endif %}
{% if now().strftime("%H")|int > 12 and now().strftime("%H")|int < 19
%}
{% set bathroomplant = states('sensor.bathroom_plant_days_since_last_watered') | float %}
{% set toiletplant = states('sensor.toilet_plant_days_since_last_watered') | float %}
{% set studycactus = states('sensor.study_cactus_days_since_last_watered') | float %}
{% set bedroomplant = states('sensor.bedroom_plant_days_since_last_watered') | float %}
{% if bathroomplant < 14 and toiletplant < 14 and studycactus < 21 and bedroomplant < 14 %}
{% elif bathroomplant >= 14 or toiletplant >= 14 or studycactus >= 21 or bedroomplant >= 14 %} Please pay some attention to your plants, as they need watering and your care to flourish.
{% else %}
{% endif %}
{% elif now().strftime("%H")|int >= 19 and now().strftime("%H")|int <
22 %}
{% set bathroomplant = states('sensor.bathroom_plant_days_since_last_watered') | float %}
{% set toiletplant = states('sensor.toilet_plant_days_since_last_watered') | float %}
{% set studycactus = states('sensor.study_cactus_days_since_last_watered') | float %}
{% set bedroomplant = states('sensor.bedroom_plant_days_since_last_watered') | float %}
{% if bathroomplant < 14 and toiletplant < 14 and studycactus < 21 and bedroomplant < 14 %}
{% elif bathroomplant >= 14 or toiletplant >= 14 or studycactus >= 21 or bedroomplant >= 14 %} Please pay some attention to your plants, as they need watering and your care attention to flourish.
{% else %}
{% endif %}
{% else %}{% endif %}
{% if now().strftime("%H")|int > 12 and now().strftime("%H")|int < 19
%}
{%- if is_state('sensor.mijnafvalwijzer_vandaag', 'papier-pmd') -%}
The trash was collected today. Please retrieve the blue and orange coloured container.
{%- elif is_state('sensor.mijnafvalwijzer_vandaag', 'duobak') -%}
The trash was collected today. Please retrieve the black and green coloured container.
{%- elif is_state('sensor.mijnafvalwijzer_vandaag', 'kerstbomen') -%}
Your christamas tree was collected today.
{% else %}
{%- endif %}
{% elif now().strftime("%H")|int >= 19 and now().strftime("%H")|int <
22 %}
{%- if is_state('sensor.mijnafvalwijzer_vandaag', 'papier-pmd') -%}
The trash was collected today. Please retrieve the blue and orange coloured container.
{%- elif is_state('sensor.mijnafvalwijzer_vandaag', 'duobak') -%}
The trash was collected today. Please retrieve the black and green coloured container.
{%- elif is_state('sensor.mijnafvalwijzer_vandaag', 'kerstbomen') -%}
Your christamas tree was collected today.
{% else %}
{% endif %}
{% elif now().strftime("%H")|int < 12 %}
{%- if is_state('sensor.mijnafvalwijzer_vandaag', 'papier-pmd') -%}
The trash will be collected today. Please put out the blue and orange coloured container.
{%- elif is_state('sensor.mijnafvalwijzer_vandaag', 'duobak') -%}
The trash will be collected today. Please put out the black and green coloured container.
{%- elif is_state('sensor.mijnafvalwijzer_vandaag', 'kerstbomen') -%}
The trash will be collected today. Please put out the christmas tree if you have any.
{% else %}
{% endif %}
{% endif %}
mode: single
Are you saying that what I should do is change the service call in here? Because that doesnât seem to do anything:
service: script.turn_on
target:
entity_id: script.google_home_resume
data:
variables:
action:
- service: script.turn_on
target:
entity_id: script.test_for_tts
data:
entity: media_player.all_speakers
extra:
volume: 0.5