Below I have a helper object that tells me the status of my dryer based on current draw. I found today it has a problem. At the end of a cycle, if the dryers wrinkle guard function is enabled, it will kick back on a toss the laundry around for 16 or 17 seconds every several minutes until either the drum cools down or the laundry is removed. so my template thinks the dryer is having mini cycles and I am constantly being notified the dryer is done.
I think it’s cleanest to fix this in the template rather than the notification, so I need to tell it it’s not considered drying unless it has been doing it for at least 18 seconds. I should probably also tell it the doors not open unless its been that way for at least 2 seconds since the history does show the trailing end of wrinkle guard may be confusing it too but one thing at a time.
I’m not sure I can create that condition cleanly in a single object. Ideas?
template:
- sensor:
- name: "Dryer status"
unique_id: dryer_status
state: >
{% set currentSnapshot = states('sensor.basement_dryer_plug_effective_current') | float(0) %}
{% if currentSnapshot > 1 %}
drying
{% elif currentSnapshot > 0.08 %}
door opened
{% else %}
off
{% endif %}
icon: >
{% set currentSnapshot = states('sensor.basement_dryer_plug_effective_current') | float(0) %}
{% if currentSnapshot > 1 %}
mdi:tumble-dryer
{% elif currentSnapshot > 0.08 %}
mdi:tumble-dryer-alert
{% else %}
mdi:tumble-dryer-off
{% endif %}