Time condition for TTS not working with blueprint

Hi all,

I’m looking for some advise on a time condition for the TTS service that’s not working on a HA blueprint (I’ve also asked in the forum for the blueprint but its fallen on deaf hears.)

The blueprint is
Notify or do something when an appliance like a dishwasher or washing machine finishes - Blueprints Exchange - Home Assistant Community (home-assistant.io)

Everything works well and at the end of the automation it sends the notification to my dashboard but it wont play the announcements via TTS to my Sonos and google home minis.

If I create a vanilla automation (not the blueprint one) without a time condition I can get the TTS service to work and so I feel I have covered off the base URL and other prerequisites such as the below in the config file.

tts:
  - platform: google_translate
    service_name: google_say

the blueprint code is

- id: "1626843740198"
  alias: Washing Machine has finished
  description: ""
  use_blueprint:
    path: sbyx/notify-or-do-something-when-an-appliance-like-a-dishwasher-or-washing-machine-finishes.yaml
    input:
      power_sensor: sensor.washingmachine_port_power
      finishing_threshold: 1
      actions:
        - service: tts.google_translate_say
          data:
            entity_id: all
            message: Clothes washing has finished
            options:
              condition:
                condition: time
                after: "08:00:00"
                before: "21:00:00"
        - service: dwains_dashboard.notification_create
          data:
            message: Clothes washing has finished
            notification_id: clothes
      finishing_hysteresis: 2

I have a copy of this for the dishwasher and it has the same issue.
The idea is that when the dishwasher or washing machine (they are separate devices and automations) finish, they send a TTS message to the “all” entity which is all my media devices (also tried just the kitchen media player as well) But I don’t want to wake up the kids / whole family if we set the dishwasher or washing machine after 9pm.

In the test automation without the time condition it works.
But once I put the condition in i get the following HA log error.

Logger: homeassistant.components.tts
Source: components/tts/init.py:189
Integration: Text-to-Speech (TTS) (documentation, issues)
First occurred: 11:13:48 AM (3 occurrences)
Last logged: 1:34:09 PM

Error on init TTS: Invalid options found: [‘condition’]

Does anyone have any ideas or other troubleshooting options.

Sorry of the long post, I’ve read a number of different posts but i can’t find anything that’s calling out what I need to do to fix it.

thanks

Ezekiel

Clear enough, isn’t it?

Where did you get that this syntax would work :wink:
As the blueprint doesn’t seem to support conditions, you’ll have to modify it (replace condition: [])

Thanks for the quick reply.
So if I read your suggestion correctly, I need to make the time condition global in the automation rather than the service action?

If that’s correct is there a way to have the time condition for the TTS service but no time condition for dashboard notification?

I guess I’m ok to sacrifice the dashboard if I have to, but its a good catch all, if the machine finishes and we aren’t in the house to hear the TTS call I can look at the dashboard notification on my phone.

thanks again

In the blueprint

If you want that condition per automation you’ll have to (or ask someone to) modify the blueprint to add that functionality.

Or make two automations?
Same triggers but two outcomes
One for the TTS time conditioned and one for the non time conditioned dashboard

The automations are based upon the blueprint.
You can take the blueprint and make it a full automation (or two, here).

Basically, everything starting with trigger: is the actual automation.
Replace all !input ... with actual values and you have an automation proper.