Chaining Condition -> Action -> Condition -> Action within automation?

Hey,
could someone help me to achieve a notification voice reminder please?
I manage to do this for single items but not for my full “flow”. What I want to do is:

Trigger: every 20min
Condition: bool-empty-dishwasher ON
Action: TTS say: “do it”
Condition: bool-washing-machine-finished ON
Action: TTS say: “do that”
Condition: bool-dryer-finished ON
Action: TTS say: “ding ding”

If I set my automation up exactly like that it doesn’t play or only plays the first entry, even if I add pauses between the actions. Is this not possible to achieve within a single automation?

I think something like this should work:

alias: Send TTS
description: ''
trigger:
- id: 'dishwasher'
  platform: state
  entity_id: input_boolean.empty_dishwasher
  to: 'on'
- id: 'washing'
  platform: state
  entity_id: input_boolean.washing_machine
  to: 'on'
- id: 'dryer'
  platform: state
  entity_id: input_boolean.dryer_finished
  to: 'on'
condition: []
action:
- choose:
  - conditions: "{{ trigger.id == 'dishwasher' }}"
    sequence:
    - service: tts.cloud_say
      data:
        entity_id: media_player.your_media
        message: Empty Dishwasher
  - conditions: "{{ trigger.id == 'washing' }}"
    sequence:
    - service: tts.cloud_say
      data:
        entity_id: media_player.your_media
        message: Washing Machine Finished
  - conditions: "{{ trigger.id == 'dryer' }}"
    sequence:
    - service: tts.cloud_say
      data:
        entity_id: media_player.your_media
        message: Dryer Finished
  default: []
mode: queued
1 Like

Thanks for the help!
I just modified and added this and it works but I wanted to have a repeating notification, every 20min or so that one of the input-bools still is on. When I add it like this I only get the notification when the state is set from off to on. Any ideas?

Consider using the Alert integration. It’s meant exactly for that purpose.

Thanks mate, I didnt know about that integration!

Great! I just implemented this and it works like a dream!
The only issue I am facing now is that I would love to add conditions like “dont nag me at 1am” or “dont shout at me when I am not even home”.
I cant seem to find how to add conditions to the alerts, is there any way to achieve that?
Another nice thing would be to flash my RGB-CCT Leds when an alert is playing, how would I do that?

That’s explained in the documentation: Complex Alert Criteria

Yea I´ve read that but I´m afraid I dont understand how to handle the conditions I need (not between 23:00-07:00 AND not when I´m not home) since I am pretty new and the description ist not very detailed.
Could you please explain?

This reports true if the current time is between 07:00 and 23:00.

{{ 7 <= now().hour < 23 }}

I don’t know what kind of entity you are using to indicate when you’re home. Assuming it’s a device_tracker then this reports true when you’re home.

{{ is_state('device_tracker.whatever', 'home') }}

You can easily combine them using a logical AND.

{{ 7 <= now().hour < 23 and is_state('device_tracker.whatever', 'home')  }}