Shelly Plug S vs. "Send a notification via mobile_app"

Hello. I use my Shelly Plug S on my clothes dryer. An i would like to receive a message, if the dryer is finished. I already use this with the Homematic measuring socket (=HMIP-PSM):

alias: Nachricht - Waschmaschine fertig
description: ''
trigger:
  - platform: numeric_state
    below: '3'
    for: '00:05:00'
    entity_id: switch.0001dbe9914c9b
    attribute: power
    above: '1'
condition: []
action:
  - service: notify.mobile_app_iphone
    data:
      title: '-- WASCHMASCHINE --'
      message: Die Waschmaschine ist fertig!
mode: single

And when I transfer that to the dryer and the Shelly Plug S it looks like this:

alias: Nachricht - Trockner fertig
description: ''
trigger:
  - platform: numeric_state
    below: '115'
    for:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
    entity_id: sensor.trockner_power
    attribute: unit_of_measurement
    above: '2'
condition: []
action:
  - service: notify.mobile_app_iphone
    data:
      title: '-- TROCKNER --'
      message: Der Trockner ist fertig!
mode: single

But it just doesn’t work. And that, although the entity “sensor.trockner_power” shows me the value in W within Homeassistant:

Any ideas? Thx!

You are testing unit_of_measurement, which is W and never changes.

Yes, that was an attempt. Because I tried it before without this attribute and it didn’t work either. But I deleted it again. Let’s see.

This will never change, and it certainly isn’t numeric.

Didn’t help either. The current value in watts is displayed in Homeassistant, but the automation does not react to it for some reason.

What is your current automation yaml?

This is my automation:

alias: Nachricht - Trockner fertig
description: ''
trigger:
  - platform: numeric_state
    below: '115'
    for:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
    entity_id: sensor.trockner_power
    attribute: ''
    above: '2'
condition: []
action:
  - service: notify.mobile_app_iphone
    data:
      title: '-- TROCKNER --'
      message: Der Trockner ist fertig!
mode: single

And the same configuration works with homematic:

alias: Nachricht - Waschmaschine fertig
description: ''
trigger:
  - platform: numeric_state
    below: '3'
    for: '00:05:00'
    entity_id: switch.0001dbe9914c9b
    attribute: power
    above: '1'
condition: []
action:
  - service: notify.mobile_app_iphone
    data:
      title: '-- WASCHMASCHINE --'
      message: Die Waschmaschine ist fertig!
mode: single

attribute: ' ' why? Take out attribute altogether.

And above: '2' - why? It appears to go to 0.

Well… That is interesting! The attribute once said “power”. I don’t use this parameter anymore since the last hint.

I’m measuring between 2 and 115 watts because when the dryer is on but no longer active, the display in Homeassistant says it’s in that range. So it comes from >115W and does not fall below 2W. I have therefore chosen the same structure as for the washing machine. And there it has been working smoothly for more than a year.

Now it´s:

alias: Nachricht - Trockner fertig
description: ''
trigger:
  - platform: numeric_state
    below: '115'
    for:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
    entity_id: sensor.trockner_power
    attribute: ''
    above: '2'
condition: []

Must admit I was seeing the graph, which could be at 2 rather than 0.

But do you need above:2 at all? If it goes below 115 for 5 minutes, surely that is enough for a trigger?

Would you elaborate on that a little more?

My understanding based on my functional automation for the washing machine: If the dryer is actively running, it reliably needs >115W. And when it’s done, it’s reliably between 2W and 115W. This is because the dry laundry will be moved at intervals for another 5 minutes. Key word: anti-crease. At this point, however, I declare the dryer complete and would like a message. But it doesn’t come at all. I was already wondering whether the trigger value of 2W-115W will be triggered at some point beforehand and the 5 minutes will start at some point in between. Maybe it’s the case that it doesn’t start a second time?!

What does the automation trace say?

It says “No traces found”. I´ve removed the range from >2W to <115W and check only a value <115. But unfortunately that didn’t help either.

And the power has made the transition from over 115 to under 115?

Yes. When I turn on my dryer, it’s well over 115W. If it follows and only moves the laundry, it is between 3W and 85W. And when it’s idle, it’s at 2.xW

Ok because the automation won’t trigger unless there is a transition from over 115 to under Makes it hard to check.

One thing more - not sure if the trigger should be '115' or 115. The difference between a string and a number?

I’ll try it! I’ll report back when the dryer is back on! Thanks!

Sorry, it always takes me a few days before it’s worth using the dryer. But I’ve tried both: Integer and String. So 115 and ‘115’. Both without success. :frowning:

Could you show a graph of the power sensor, or a logbook output showing when you think it should have activated.

The Shelly Plug S entity bears the name “sensor.trockner_power”. When I look at the history I see this:

And if i search “sensor.trockner_power” at the logbook, there is no entry! Annndd: My automation trace continues to say: “No traces found”.