Hi all,
I am using a laudrify adapter to monitor my wahser/dryer.
I have a problem with the message of my automation.
When the devices are done, i get a message via telegram that is is ready.
My “problem” is that i always get as running time 1:00:00
alias: Waschmaschine Simple
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.meine_waschmaschine
to: "off"
from: "on"
- platform: state
entity_id:
- binary_sensor.meine_waschmaschine
from: "on"
to: unavailable
condition: []
action:
- service: notify.all_telegram
data:
message: >-
Meine Waschmaschine ist fertig nach {{ (now().timestamp() -
as_timestamp(states.binary_sensor.meine_waschmaschine.last_changed)) |
timestamp_custom('%H:%M:%S')}} Stunden
enabled: true
mode: single
i believe my problem is that this is triggered everytime when it is done (last changed), but it’d need the second_to_last_changed state resp. the last time it changed to running and not done.
What would be the right formula for the time calculation in my message?
Thanks a lot
wasty