I did something different by displaying a “conditional” card on my dashboard (tablet on the wall). if the dishwasher is running, the Card is visible and shows the remaining time. If its not running the card is not shown at all as it only occupies unnessicary space on my tablet.
My Dishwasher is connected with the Home Connect integration so i have access to the API for more enteties then i need on the device though so might not be applicable to everyone.
- type: conditional
conditions:
- entity: sensor.diskmaskin_operation_state
state: Run
card:
type: markdown
style: |
ha-card {
--ha-card-background: #594819 !important;
border-radius:20px;
}
content: >
<ha-icon icon="mdi:dishwasher"></ha-icon> Diskmaskin, kvarvarande tid: <b>{%
if states('sensor.diskmaskin_remaining_program_time') == 'unavailable' %}
--- {% elif
(as_timestamp(states('sensor.diskmaskin_remaining_program_time'))) >0 %}
<span style='font-size:24px !important; text-align:right;'> {% set sec =
as_timestamp(states('sensor.diskmaskin_remaining_program_time'))-as_timestamp(now())
%} {%set hr = (sec / 3600) | int %} {%set min = sec / 60 - hr * 60%} {% if
hr > 0 %} {{"%d:%02d" % (hr, min)}} {%else%} {{min | int}} Minuter {% endif %} {%
endif %}</span></b>
Edit, Almost forgot, I also have a trigger for when the dishwasher is Done, then i do a TTS message.
Trigger
platform: state
entity_id: sensor.diskmaskin_operation_state
from: Run
to: Finished
Action
service: tts.google_say
data:
entity_id: media_player.home_nest_mini_group
message: Diskmaskinen är klar