Dumb washing machine automation with sonoff POW

Hi there, I am trying to get my google home mini to announce that the washing machine is done. I have a sonoff pow r2 connected to the washing machine and I have the following in my automations.yaml. Not entirely sure if true and false are what I should be using, quite new to all this. Basically when the wattage drops to zero I want it to wait for a minute or two and then announce the message. Thanks in advance for any help.

- id: '1566235639168'
  alias: Laundry done
  trigger:
  - entity_id: sensor.pow_1_energy_current
    for: 01:00
    from: 'true'
    platform: state
    to: 'false'
  condition: []
  action:
  - data:
      message: The laundry is done.
    service: tts.google_translate_say

Assuming your sensor current returns a numeric value, you should use that platform as well. No true of false state is needed here. And you’re missing the entity of your google home.

The below code should work when you fill in the missing information

- id: '1566235639168'
  alias: Laundry done
  trigger:
  - below: '1'
    entity_id: sensor.pow_1_energy_current
    for: 
      minutes: 1 #fill in the required minutes to wait before the message should be send
    platform: numeric_state
  condition: []
  action:
  - data:
      language: en
      message: The laundry is done.
    entity_id: <YOUR ENTITY ID> #it requires an entity
    service: tts.google_translate_say 

Thanks for your answer. I was missing the entity id but usually when that isn’t defined it broadcasts to all available devices. Have tried the numeric trigger too, doesn’t seem to work. Technically, the POW is idle all the time the washing machine isn’t on, so doesn’t that mean that the tts message would go on every minute of the day since the current is below 5 at all times? Any help with this is welcome :slight_smile:

I use the following automation (publishing to pushbullet and Google Home). The condition of 5 minutes is to prevent the automation from firing after I restart Homeassistant.

- id: wasmachine_notify
  alias: Wasmachine notify
  trigger:
  - below: '20'
    entity_id: sensor.energy_washing_machine
    platform: numeric_state
  condition:
  - above: '5'
    condition: numeric_state
    entity_id: sensor.time_online
  action:
  - data:
      message: De wasmachine is klaar
      title: Wasmachine
    service: notify.simplepush
  - data:
      entity_id: media_player.googlehome2233
      language: nl
      message: De wasmachine is klaar!
    service: tts.google_say