Lovelace string / script help

I have a washing machine on which I have a door sensor. When the door closes, a countdown timer starts.

timer.vaskemaskin

timer:
  vaskemaskin:
    duration: '00:02:00'
    icon: mdi:washing-machine

Card in ui-lovelace.yaml

    - type: entities
      entities:
        - entity: timer.vaskemaskin
          icon: mdi:washing-machine
          name: Time for the washing machine to finish
          condition: "{{is_state('timer.vaskemaskin', 'active')}}"

vaskemaskin2

Is it possible to create a string / script that changes the text in the card to “The washing machine is finished!” when the timer finishes countdown (and goes to “idle”) and the door is still closed (binary_sensor.vaskemaskin = off)?

And that changes the text in the card to “The washing machine is empty” when the door is opened (binary_sensor.vaskemaskin = on).?

Really appreciate the help in solving this as it will make my wife very happy :smiling_face_with_three_hearts:

You could use the HACS plugin
auto-entities
It will display a different entities card based
on its state if the state isn’t valid it won’t be displayed

How do I use auto-entities to change the text based on the state of the timer and door sensor?

Yep that is a problem I checked and i don’t think it’s possible with auto-entities.

You can do it with 3 standard conditional card.
Each will only appear if the condition is true.
You can have multi conditions as they are treated a AND condition so all conditions must be true for it to appear.

1 Like

Thank you :hugs:
Using conditional card and your attachment there was no problem to make my wife happy

Then it only remains to find out how I can get added a background image at the top of the card (as a top banner).

That would be a markdown card

1 Like

Well if you really want to impress her you should stick a power monitor on it
And do something like what I did.

Wow! That looks cool :+1:

well i was most impress the other day when i saw my 70+ year old mother in law stop watching her show on TV and go and take the washing out of the machine as soon as she heard the announcements
Just proves that you can train an old dog new tricks.

lol