I have an LG washing machine where the countdown timer on some occasions gets stuck on the same time for any amount of time without notifying me. E.g washer says 6 minutes until it finishes but in reality it keeps going “infinitely”
How can I detect if state is above 0:00:00 and at the same time the x remaining time state is not longer than e.g 5 minutes?
Edit: Using this template seems to solve this question. (Trigger automation if no state update for x minutes - #23 by Oliviakrk)
It requires to enable the Time & Date - Home Assistant integration
platform: template
value_template: >-
{% if as_timestamp(states.sensor.time.last_updated) -
as_timestamp(states.sensor.lg_pracka_f2wv9s8p2_remaining_time.last_updated) >
5*60 %}true{% endif %}
Full automatization:
alias: LG Washer stuck countdown
trigger:
- platform: template
value_template: >-
{% if as_timestamp(states.sensor.time.last_updated) -
as_timestamp(states.sensor.lg_pracka_f2wv9s8p2_remaining_time.last_updated)
> 5*60 %}true{% endif %}
condition:
- condition: state
entity_id: sensor.lg_pracka_f2wv9s8p2
state: "on"
action:
- service: notify.alexa_media_echo_dot_gen_4
data:
message: "Washing machine countdown timer is stuck"
mode: single