šŸ“³ Appliance Notifications & Actions - Washing Machine - Clothes Dryer - Dish Washer - ETC

My Washer automation stopped working at 2.6.

My YAML is below.

description: ""
use_blueprint:
  path: Blackshome/appliance-notifications.yaml
  input:
    power_sensor: sensor.washing_machine_electric_consumption_w
    include_start_notify: enable_start_notify_options
    start_title: Washer
    start_notify_data: []
    include_end_notify: enable_end_notify_options
    start_notify_device:
      - 1cfea90cb9e83023f6859604452adeb5
    end_notify_device:
      - 1cfea90cb9e83023f6859604452adeb5
      - 82efe31776fb16cca3166c33f756fef5
    end_message_title: Washer
    end_message: Hey! Your fresh laundry is ready, don't leave it hanging!
    end_notify_interruption_level: time-sensitive
    end_notify_data: []
    start_notify_interruption_level: active
    include_custom_actions:
      - enable_end_custom_actions
    end_custom_actions:
      - action: persistent_notification.create
        metadata: {}
        data:
          message: Washer Done
          title: "Appliance "
      - action: tts.cloud_say
        metadata: {}
        data:
          cache: false
          entity_id: media_player.sonos_first_floor
          message: Hey! Your fresh laundry is ready, don't leave it hanging!
        enabled: true
      - action: tts.cloud_say
        metadata: {}
        data:
          cache: false
          entity_id: media_player.sonos_first_floor
          options:
            voice: GuyNeural
          message: "{{ agent.response.speech.plain.speech }}"
        enabled: false
      - variables:
          prompt: >-
            Please generate a hilarious message to be used for a smart home
            notification informing the owners that their washing machine is
            done. 

            make it brief, as in a short sentence. 
        alias: Prompt Washer
        enabled: false
      - alias: Send prompt to AI
        data:
          text: |-

            {{ prompt }}
          agent_id: conversation.chatgpt
        response_variable: agent
        action: conversation.process
        enabled: false
      - action: script.test_ai
        metadata: {}
        data: {}
        enabled: false
      - action: script.test_ai
        metadata: {}
        data: {}
        enabled: false
      - action: script.washer_finished_door_unopened
        metadata: {}
        data: {}
        enabled: false
    start_custom_actions: []
    end_reminder_notification_message: Hey! Your fresh laundry is ready, don't leave it hanging!
    start_appliance_power: 5

Automation Config

Appliance: Washer Finished

October 8, 2024 at 8:04:03 PM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
āŒ„
mode: single
max_exceeded: silent
variables:
  power_sensor: sensor.washing_machine_electric_consumption_w
  start_appliance_power: 5
  start_time_delay: 1
  end_appliance_power: 5
  end_time_delay: 1
  end_repeat_count: 1
  include_start_notify: enable_start_notify_options
  start_notify_device:
    - 1cfea90cb9e83023f6859604452adeb5
  start_title: Washer
  start_message: YES! Another load is ON :)
  start_notify_interruption_level: active
  start_notify_sound: []
  start_notify_data: []
  start_notify_channel: []
  running_dead_zone: 0
  include_end_notify: enable_end_notify_options
  end_notify_device:
    - 1cfea90cb9e83023f6859604452adeb5
    - 82efe31776fb16cca3166c33f756fef5
  end_message_title: Washer
  end_message: Hey! Your fresh laundry is ready, don't leave it hanging!
  end_notify_interruption_level: time-sensitive
  end_notify_sound: []
  end_notify_data: []
  end_notify_channel: []
  end_reminder_notification: disable_reminder_notification
  end_reminder_notification_entity: []
  end_reminder_notification_message: Hey! Your fresh laundry is ready, don't leave it hanging!
  end_reminder_notification_time_delay: 10
  end_reminder_notification_max_count: 2
  include_power_tracking: disable_power_tracking
  power_consumption_sensor: []
  end_message_kwh: Consumption
  end_message_cost: Approx Cost $
  cost_per_kwh: []
  start_power_consumption: []
  end_power_consumption: []
  include_duration_tracking: disable_duration_tracking
  end_message_duration_tracking: Duration
  start_time: '{{ now().timestamp() }}'
  include_watchdog: disable_watchdog
  watchdog_timeframe: '00:00:00'
  watchdog_title: āš ļø Appliance Watchdog
  watchdog_message: Uh-oh! Time to check the washing machine.
  watchdog_notify_interruption_level: active
  watchdog_notify_sound: []
  watchdog_notify_data: []
  watchdog_notify_channel: []
  include_custom_actions:
    - enable_end_custom_actions
  start_custom_actions: []
  watchdog_custom_actions: []
  end_custom_actions:
    - action: persistent_notification.create
      metadata: {}
      data:
        message: Washer Done
        title: 'Appliance '
    - action: tts.cloud_say
      metadata: {}
      data:
        cache: false
        entity_id: media_player.sonos_first_floor
        message: Hey! Your fresh laundry is ready, don't leave it hanging!
      enabled: true
    - action: tts.cloud_say
      metadata: {}
      data:
        cache: false
        entity_id: media_player.sonos_first_floor
        options:
          voice: GuyNeural
        message: '{{ agent.response.speech.plain.speech }}'
      enabled: false
    - variables:
        prompt: >-
          Please generate a hilarious message to be used for a smart home
          notification informing the owners that their washing machine is done. 

          make it brief, as in a short sentence. 
      alias: Prompt Washer
      enabled: false
    - alias: Send prompt to AI
      data:
        text: |-

          {{ prompt }}

First Step of my last trace with the error " This step was not executed and so no further trace information is available."

platform: numeric_state
id: t0
entity_id: sensor.washing_machine_electric_consumption_w
above: 5
below: '24000'
for:
  minutes: 1 ```

@Dr.proctor

Tested here with your YAML all works. I deleted your custom actions and just turned on a light for the end custom action and all is good.

You will get this but there is nothing to worry about as the automation is already running. Note, If you edit / restart it will not complete the cycle.

Blacky :smiley:

Blacky, Thanks for this. Your blueprints are excellent

How would you code this? (Iā€™m bumping up against 120 mins max dead zone, and 5 mins max power time delay)

First of all, thanks for contributing this great Blueprint!

It seems iā€™m having a similar issue as @Dr.proctor in my setup. Iā€™m using 2.6 of the Blueprint, and iā€™m using an AI-generated message in the end custom action, writing this to a variable, and afterwards trying to use tts to output the text to my speakers.

The error iā€™m getting is ā€˜Error rendering variables: UndefinedError: ā€˜wama_fertig_ansageā€™ is undefinedā€™, where wama_fertig_ansage is my response variable.

If i remove the variable part, it works, otherwise the automation does not even start, nor creates a valid trace. Only the error log is created.

I have the feeling i cannot use the response variable from the AI part. Any idea on this?

As a reference, these are the relevant custom actions:

end_custom_actions:
  - action: google_generative_ai_conversation.generate_content
    metadata: {}
    data:
      prompt: >-
        Prompt inserted here.
    response_variable: wama_fertig_ansage
    enabled: true
  - action: tts.google_translate_say
    data:
      cache: true
      entity_id: media_player.nestaudio2760
      language: de
      message: "{{ wama_fertig_ansage.text }}"

@GeorgeCastanza

Try doing this by not setting a dead zone and using the count. That is if it is the same every time. End - Repeat Count will be 4 and your End - Power Time Delay is the time at the end shown. Then your End - Appliance Power Setpoint will be at the 1, 2, 3 & 4 lines.

You can type a value longer in if you like and click save but maybe try the above and setting your dead zone to 0.

Blacky :smiley:

@tmakowka

Sorry I donā€™t use AI but it should work if you got it all set up correctly. Maybe try creating a automation with a button helper as the trigger so you can test your action. Maybe you need a delay in between the AI to TTS. You could also ask the community in a separate topic on how to achieve this AI action that way you will get a better response. Once you got it working there then you can add the action to the blueprint.

Hope you work it out and if you do maybe post your solution here so if someone is looking for the How To they will know what to do.

Blacky :smiley:

Love the blueprint! But it seems to fail each time at this step.

Stopped because only a single execution is allowed at October 17, 2024 at 11:52:09 AM (runtime: 0.00 seconds)

Wondering if I am doing something incorrect in the set-up. I have read the notes above and waited for the automation to complete, and then restarted another load of laundry. But I am never getting the end notification, even after the awaited time.

I am new to Homeassistant, so this is the first blueprint I have copied.

Iā€™m getting this as well. My first use of this blueprint.

@jesseblount @GeorgeCastanza

This is because the automation is already running. This is normal if the automation re-triggers again when running. If you let it run and your end settings are correct it will complete the cycle.

TIP: When looking at traces you can use the back / forward arrows to scroll through the last 4 triggers.

Blacky :smiley:

Absolutely love this Blueprint, relatively new to HA and monitoring my washer/dryer cycles was one of my first goals! So thanks so much for that.

Iā€™ve got a few questions to progress my implementationā€¦

  1. I might be missing something but, I was looking to see ā€˜how many times my washer had run this weekā€™, as well as using the state of the washing machine to be used by other automations. Is the best approach for me to create my own boolean helper ā€œwashing machine stateā€ and trigger it via the start/end actions? I didnā€™t see any mentions of ā€˜stateā€™ in the Blueprint I could track, but could well be missing it.

  2. I canā€™t work out how to best send notifications to only devices that are ā€˜homeā€™, I could only see a way to notify specific devices.

  3. The wattage levels for sensing, although working, were surprisingly low? Iā€™m in Australia and Iā€™m pulling up to 2000W during a cycle, but the trigger limits seem to max out at 30W. Again, itā€™s catching the start/end accurately, so itā€™s working, but I was considering using higher values to be more sure about running state?

Cheers!
AB

ā€¦thinking further on this to share where I might be headedā€¦

Ideally I would have a ā€˜latchedā€™ state of ā€˜finishedā€™, butā€¦not yet ā€˜emptiedā€™, whereby the state ā€˜finishedā€™ would wait for, say, a contact sensor on the door to open to complete the cycle to ā€˜emptiedā€™.

Cheers,
AB

Hi @Blacky
i already tried to isolate this, but it worked then. When iā€™ve got some time iā€™ll fiddle with this further :slight_smile: Thanks!

1 Like

@twobigpaws

Welcome to the community.

  1. You could use the end custom actions and use that to count your cycles.

  2. You would again have to use the custom action if you would like to do this as it will send a notification to everyone in the list.

  3. Just simply type you value you would like into the input and click save.

Blacky :smiley:

1 Like

@twobigpaws

In the End Notify there is a Reminder Notification. You can use this with your door contact sensor.

Blacky :smiley:

1 Like

I am thinking to use this blueprint to send a reminder if my oven is left on and i thought the watchdog feature would be perfect. What i could not see in the documentation is how to configure which devices to notify specifically for the watchdog timeout?

@bluemonkeysuit07

It will be the devices in the End Notify.

Blacky :smiley:

1 Like

Does that mean end notify must be enabled? or can it be disabled so long as the devices to notify are defined?

Must be enabled.

Blacky :smiley:

oh, well after i posted i tried and it seemed to work with end notify disabledšŸ¤·

I recreated the whole automation with your latest version updates and that worked. Thank you

1 Like