Samsung Washing Machine Card

I have been looking for a card to show my Samsung Washing Machine on my dashboard, eventually I found find this awesome post from @rphlwnk, where they had done most of the hard work, thanks!

I just wanted to break down the steps for anyone else who is looking for a Samsung Washing Machine card and is on a more basic level like me, so it’s a bit easier to follow.

This guide assumes you have

Once you’ve got these, let’s go!

  • If you haven’t already, install HACS. In the side menu go to Configuration > Devices & Services > + Add Integration, and search for ‘HACS’ (You may need to restart after this)
  • In the side menu go to HACS > Frontend > + Explore & Download Repositories, and search for ‘card-mod’
  • In the side menu go to HACS > Frontend > + Explore & Download Repositories, and search for ‘button-card’ (You may need to restart after this)
  • Install a code editing add-on like Studio Code Server and open it
  • Open your configuration.yaml file and paste the following code from @rphlwnk on a new line with no indentation before ‘template’, replacing the sensor names in bold if needed with your sensor names:

NOTE: Go to Developer Tools in the sidebar menu and in ‘Filter entities’ type “wash” to check whether your sensors are sensor.washer… or sensor.washing_machine

template:
  - sensor:
      - unique_id: washer_remaining_time
        name: 'Remaining Time'
        state: >-
          {% set rem_h = (as_timestamp(states.sensor.washer_completion_time.state) - as_timestamp(now())) | timestamp_custom('%-H', false) %}
          {% set rem_m = (as_timestamp(states.sensor.washer_completion_time.state) - as_timestamp(now())) | timestamp_custom('%-M', false) %}
          {% if int(rem_h) > 0.9 %} {{ rem_h }} hour(s) and {{ rem_m }} minute(s)  {% else %} {{ rem_m }} minute(s) {% endif %}
  • Save and restart
  • Go to the page where you want to include the washing machine card and click the three dots in the top-right corner > Edit Dashboard > three dots again > Raw configuration editor
  • In the top of the editor, paste the following if you have a washer dryer…:
button_card_templates:
  icon_info:
    color: var(--color-theme)
    show_icon: true
    show_name: true
    show_label: true
    size: 20px
    custom_fields:
      notification: |
        [[[
          if (entity.state =='unavailable'){
            return `<ha-icon icon="mdi:exclamation" style="width: 12px; height: 12px; color: var(--primary-background-color);"></ha-icon>`
          }
        ]]]
    state:
      - styles:
          custom_fields:
            notification:
              - border-radius: 50%
              - position: absolute
              - left: 24px
              - top: '-2px'
              - height: 16px
              - width: 16px
              - border: 2px solid var(--card-background-color)
              - font-size: 12px
              - line-height: 14px
              - background-color: |
                  [[[
                    return "rgba(var(--color-red),1)";
                  ]]]
        value: unavailable
    styles:
      card:
        - border-radius: 21px 8px 8px 21px
        - box-shadow: none
        - padding: 0px
      grid:
        - grid-template-areas: '"i n" "i l"'
        - grid-template-columns: min-content auto
        - grid-template-rows: min-content min-content
      icon:
        - color: rgba(var(--color-theme),0.2)
      img_cell:
        - background-color: rgba(var(--color-theme),0.05)
        - border-radius: 50%
        - place-self: center
        - width: 42px
        - height: 42px
      name:
        - align-self: end
        - justify-self: start
        - font-weight: bold
        - font-size: 14px
        - margin-left: 12px
      label:
        - justify-self: start
        - align-self: start
        - font-weight: bolder
        - font-size: 12px
        - filter: opacity(40%)
        - margin-left: 12px
      state:
        - justify-self: start
        - align-self: start
        - font-weight: bolder
        - font-size: 12px
        - filter: opacity(40%)
        - margin-left: 12px
  custom_washer_state_job_state_grid_item_list:
    styles:
      card:
        - box-shadow: none
        - padding: 0px
        - border-radius: var(--border-radius)
        - pointer-events: none
        - background-color: rgba(var(--color-theme), 0.05)
        - justify-items: center
      grid:
        - grid-template-areas: '"item1 item2 item3 item4 item5"'
        - grid-template-columns: 1fr 1fr 1fr 1fr
        - grid-template-rows: min-content
        - column-gap: 7px
        - justify-items: center
      img_cell:
        - justify-items: center
  custom_washer_state_grid_job_state_item_list_items:
    show_icon: true
    show_name: false
    size: 20px
    tap_action:
      action: none
    styles:
      card:
        - box-shadow: none
        - padding: 0px
        - border-radius: 50%
        - place-self: center
        - height: 42px
        - width: 42px
        - pointer-events: auto
        - background-color: transparent
      grid:
        - grid-template-areas: '"i"'
      icon:
        - color: var(--color-theme)
  custom_washer_state_grid_state_item_list:
    styles:
      card:
        - box-shadow: none
        - padding: 0px
      grid:
        - grid-template-areas: '"item1 item2"'
        - grid-template-columns: 1fr 1fr
        - grid-template-rows: min-content
        - column-gap: 7px
  custom_washer_state_grid:
    styles:
      card:
        - border-radius: var(--border-radius)
        - box-shadow: var(--box-shadow)
        - padding: 12px
      grid:
        - grid-template-areas: '"item1" "item2"'
        - grid-template-columns: 1fr
        - grid-template-rows: min-content  min-content
        - row-gap: 12px
    custom_fields:
      item1:
        card:
          type: custom:button-card
          template: custom_washer_state_grid_state_item_list
          custom_fields:
            item1:
              card:
                type: custom:button-card
                template:
                  - icon_info
                entity: '[[[ return variables.ulm_custom_washer_grid_machine_state ]]]'
                icon: mdi:washing-machine
                name: Washing machine
                tap_action:
                  action: more-info
                label: not running
                state:
                  - value: 'on'
                    label: running
                    styles:
                      icon:
                        - color: rgba(var(--color-blue), 1)
                      img_cell:
                        - background-color: rgba(var(--color-background-blue), 0.2)
            item2:
              card:
                type: conditional
                conditions:
                  - entity: >-
                      [[[ return variables.ulm_custom_washer_grid_machine_state
                      ]]]
                    state: 'on'
                card:
                  type: custom:button-card
                  template:
                    - icon_info
                  entity: >-
                    [[[ return
                    variables.ulm_custom_washer_grid_completion_timestamp ]]]
                  icon: mdi:progress-clock
                  tap_action:
                    action: none
                  label: >-
                    [[[ return
                    states[variables.ulm_custom_washer_grid_completion_timestamp].state
                    ]]]
      item2:
        card:
          type: custom:button-card
          template: custom_washer_state_job_state_grid_item_list
          custom_fields:
            item1:
              card:
                type: custom:button-card
                icon: mdi:scale
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: weightSensing
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item2:
              card:
                type: custom:button-card
                icon: mdi:waves
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: wash
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item3:
              card:
                type: custom:button-card
                icon: mdi:water
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: rinse
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item4:
              card:
                type: custom:button-card
                icon: mdi:fan
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: spin
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
	    item5:
              card:
                type: custom:button-card
                icon: mdi:tumble-dryer
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: 'drying'
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
  • Or the following if you have just a washing machine:
button_card_templates:
  icon_info:
    color: var(--color-theme)
    show_icon: true
    show_name: true
    show_label: true
    size: 20px
    custom_fields:
      notification: |
        [[[
          if (entity.state =='unavailable'){
            return `<ha-icon icon="mdi:exclamation" style="width: 12px; height: 12px; color: var(--primary-background-color);"></ha-icon>`
          }
        ]]]
    state:
      - styles:
          custom_fields:
            notification:
              - border-radius: 50%
              - position: absolute
              - left: 24px
              - top: '-2px'
              - height: 16px
              - width: 16px
              - border: 2px solid var(--card-background-color)
              - font-size: 12px
              - line-height: 14px
              - background-color: |
                  [[[
                    return "rgba(var(--color-red),1)";
                  ]]]
        value: unavailable
    styles:
      card:
        - border-radius: 21px 8px 8px 21px
        - box-shadow: none
        - padding: 0px
      grid:
        - grid-template-areas: '"i n" "i l"'
        - grid-template-columns: min-content auto
        - grid-template-rows: min-content min-content
      icon:
        - color: rgba(var(--color-theme),0.2)
      img_cell:
        - background-color: rgba(var(--color-theme),0.05)
        - border-radius: 50%
        - place-self: center
        - width: 42px
        - height: 42px
      name:
        - align-self: end
        - justify-self: start
        - font-weight: bold
        - font-size: 14px
        - margin-left: 12px
      label:
        - justify-self: start
        - align-self: start
        - font-weight: bolder
        - font-size: 12px
        - filter: opacity(40%)
        - margin-left: 12px
      state:
        - justify-self: start
        - align-self: start
        - font-weight: bolder
        - font-size: 12px
        - filter: opacity(40%)
        - margin-left: 12px
  custom_washer_state_job_state_grid_item_list:
    styles:
      card:
        - box-shadow: none
        - padding: 0px
        - border-radius: var(--border-radius)
        - pointer-events: none
        - background-color: rgba(var(--color-theme), 0.05)
        - justify-items: center
      grid:
        - grid-template-areas: '"item1 item2 item3 item4"'
        - grid-template-columns: 1fr 1fr 1fr 1fr
        - grid-template-rows: min-content
        - column-gap: 7px
        - justify-items: center
      img_cell:
        - justify-items: center
  custom_washer_state_grid_job_state_item_list_items:
    show_icon: true
    show_name: false
    size: 20px
    tap_action:
      action: none
    styles:
      card:
        - box-shadow: none
        - padding: 0px
        - border-radius: 50%
        - place-self: center
        - height: 42px
        - width: 42px
        - pointer-events: auto
        - background-color: transparent
      grid:
        - grid-template-areas: '"i"'
      icon:
        - color: var(--color-theme)
  custom_washer_state_grid_state_item_list:
    styles:
      card:
        - box-shadow: none
        - padding: 0px
      grid:
        - grid-template-areas: '"item1 item2"'
        - grid-template-columns: 1fr 1fr
        - grid-template-rows: min-content
        - column-gap: 7px
  custom_washer_state_grid:
    styles:
      card:
        - border-radius: var(--border-radius)
        - box-shadow: var(--box-shadow)
        - padding: 12px
      grid:
        - grid-template-areas: '"item1" "item2"'
        - grid-template-columns: 1fr
        - grid-template-rows: min-content  min-content
        - row-gap: 12px
    custom_fields:
      item1:
        card:
          type: custom:button-card
          template: custom_washer_state_grid_state_item_list
          custom_fields:
            item1:
              card:
                type: custom:button-card
                template:
                  - icon_info
                entity: '[[[ return variables.ulm_custom_washer_grid_machine_state ]]]'
                icon: mdi:washing-machine
                name: Washing machine
                tap_action:
                  action: more-info
                label: not running
                state:
                  - value: 'on'
                    label: running
                    styles:
                      icon:
                        - color: rgba(var(--color-blue), 1)
                      img_cell:
                        - background-color: rgba(var(--color-background-blue), 0.2)
            item2:
              card:
                type: conditional
                conditions:
                  - entity: >-
                      [[[ return variables.ulm_custom_washer_grid_machine_state
                      ]]]
                    state: 'on'
                card:
                  type: custom:button-card
                  template:
                    - icon_info
                  entity: >-
                    [[[ return
                    variables.ulm_custom_washer_grid_completion_timestamp ]]]
                  icon: mdi:progress-clock
                  tap_action:
                    action: none
                  label: >-
                    [[[ return
                    states[variables.ulm_custom_washer_grid_completion_timestamp].state
                    ]]]
      item2:
        card:
          type: custom:button-card
          template: custom_washer_state_job_state_grid_item_list
          custom_fields:
            item1:
              card:
                type: custom:button-card
                icon: mdi:scale
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: weightSensing
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item2:
              card:
                type: custom:button-card
                icon: mdi:waves
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: wash
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item3:
              card:
                type: custom:button-card
                icon: mdi:water
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: rinse
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item4:
              card:
                type: custom:button-card
                icon: mdi:fan
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: spin
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
  • Restart and hopefully, eureka!

image_2022-03-31_102236

Big thanks again to @rphlwnk!

4 Likes

How do you add this without pasting into your entire raw config?

A better approach would at least be “add card → manual custom card”. Pasting into the raw config is not recommended. I’m not sure where it’s even expected to appear. Thanks anyway.

In my case, this has not worked.
Also when I paste the configuration into the card I’m getting an error in line 249.

Have followed the instructions for a Washing Machine but no luck with the implementation of the button card. Anybody else had any sucess

Hello,

I added my Smart Thine washing machine from Samsung, but I do not see any entities?

What am I doing wrong?

Greetings

Philipp

I haven’t tried this custom card setup yet, Does the card have controls or just display status?

Can it pause/unpause the washer (when the washer is in the right mode where it will accept remote control)?

For anyone else who was confused, OP forgot to post the actual button card that you should add to your dashboard view:

  type: custom:button-card
  template: custom_washer_state_grid
  variables:
    ulm_custom_washer_grid_machine_state: switch.washer
    ulm_custom_washer_grid_job_state: sensor.washer_job_state
    ulm_custom_washer_grid_completion_timestamp: sensor.washer_remaining_time

The templates they pasted should go on the very top of the raw config editor, as they are not used for anything other than to feed information into the actual button card above.

If you have a dryer, you just need to change grid-template-areas from 4 items to 3 items, and grid-template-columns to 1fr 1fr 1fr. Here’s mine:

  custom_dryer_state_job_state_grid_item_list:
    styles:
      card:
        - box-shadow: none
        - padding: 0px
        - border-radius: var(--border-radius)
        - pointer-events: none
        - background-color: rgba(var(--color-theme), 0.05)
        - justify-items: center
      grid:
        - grid-template-areas: '"item1 item2 item3"'
        - grid-template-columns: 1fr 1fr 1fr
        - grid-template-rows: min-content
        - column-gap: 7px
        - justify-items: center
      img_cell:
        - justify-items: center
  custom_dryer_state_grid_job_state_item_list_items:
    show_icon: true
    show_name: false
    size: 20px
    tap_action:
      action: none
    styles:
      card:
        - box-shadow: none
        - padding: 0px
        - border-radius: 50%
        - place-self: center
        - height: 42px
        - width: 42px
        - pointer-events: auto
        - background-color: transparent
      grid:
        - grid-template-areas: '"i"'
      icon:
        - color: var(--color-theme)
  custom_dryer_state_grid_state_item_list:
    styles:
      card:
        - box-shadow: none
        - padding: 0px
      grid:
        - grid-template-areas: '"item1 item2"'
        - grid-template-columns: 1fr 1fr
        - grid-template-rows: min-content
        - column-gap: 7px
  custom_dryer_state_grid:
    styles:
      card:
        - border-radius: var(--border-radius)
        - box-shadow: var(--box-shadow)
        - padding: 12px
      grid:
        - grid-template-areas: '"item1" "item2"'
        - grid-template-columns: 1fr
        - grid-template-rows: min-content  min-content
        - row-gap: 12px
    custom_fields:
      item1:
        card:
          type: custom:button-card
          template: custom_dryer_state_grid_state_item_list
          custom_fields:
            item1:
              card:
                type: custom:button-card
                template:
                  - icon_info
                entity: '[[[ return variables.ulm_custom_dryer_grid_machine_state ]]]'
                icon: mdi:tumble-dryer
                name: Dryer
                tap_action:
                  action: more-info
                label: not running
                state:
                  - value: 'on'
                    label: running
                    styles:
                      icon:
                        - color: rgba(var(--color-blue), 1)
                      img_cell:
                        - background-color: rgba(var(--color-background-blue), 0.2)
            item2:
              card:
                type: conditional
                conditions:
                  - entity: >-
                      [[[ return variables.ulm_custom_dryer_grid_machine_state
                      ]]]
                    state: 'on'
                card:
                  type: custom:button-card
                  template:
                    - icon_info
                  entity: >-
                    [[[ return
                    variables.ulm_custom_dryer_grid_completion_timestamp ]]]
                  icon: mdi:progress-clock
                  tap_action:
                    action: none
                  label: >-
                    [[[ return
                    states[variables.ulm_custom_dryer_grid_completion_timestamp].state
                    ]]]
      item2:
        card:
          type: custom:button-card
          template: custom_dryer_state_job_state_grid_item_list
          custom_fields:
            item1:
              card:
                type: custom:button-card
                icon: mdi:scale
                template: custom_dryer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_dryer_grid_job_state ]]]'
                state:
                  - value: weightSensing
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item2:
              card:
                type: custom:button-card
                icon: mdi:hair-dryer
                template: custom_dryer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_dryer_grid_job_state ]]]'
                state:
                  - value: drying
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item3:
              card:
                type: custom:button-card
                icon: mdi:snowflake
                template: custom_dryer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_dryer_grid_job_state ]]]'
                state:
                  - value: cooling
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey

(I re-used the same icon_info template). Button card code should be very similar, just replace washer with dryer.

EDIT: To answer question above, no the card doesn’t have controls. You can add a tap_action to some of the items and add your own actions, but you’ll have to figure out if the Smartthings integration allows you to control your washer.

2 Likes

I tried to follow the directions, but it doesn’t work, could someone make a clearer guide to integrate the samsung washing machine into the home assistant?

5 Likes

Hy, i tried tó do this. But when infinsh i got this error message:
Button-card template ‘custom_washer_state_grid’ is missing!
type: custom:button-card
template: custom_washer_state_grid
variables:
ulm_custom_washer_grid_machine_state: switch.washer
ulm_custom_washer_grid_job_state: sensor.washer_job_state
ulm_custom_washer_grid_completion_timestamp: sensor.washer_remaining_time

Where should I search the problem?

1 Like

the top-right corner > Edit Dashboard > three dots again > Raw configuration editor
ADD CODE AT THE BEGINING:

button_card_templates:
  icon_info:
...

@ Kicsicianka

Did you sort your problem…I have the same error about “Button-card template ‘custom_washer_state_grid’ is missing”

Yeah i dont get it to work either.
I dont get any error anymore but just an empty box

It appears the instructions noted do not include a template design for “custom_washer_state_grid”. Perhaps the person who posted it initially can fill in the blanks?

Hello!

I am having a bit of trouble getting this card to work. I have followed blindly this guide, but I can’t get the card to even show up on my dashboard.

I have added the button_card_template to raw configuration and I have installed HACS. Also added the template in configuration file.

Also changed the sensor names to the appriopriate names. Not sure what I missed? Should I do something inside HACS after I have installed the button-card and card-mod?

Also, when I am in iOS HA app I get this message in the overview:

Ok I got a little further on my on trying various different things. I am now struggling with the card itself, why is the timestamp so wierd and the 4 buttons doesn’t actually do anything? Can click them but nothing happens.

So my card looks like this now:
Untitled

The code for the card:

type: custom:button-card
template: custom_washer_state_grid
variables:
  ulm_custom_washer_grid_machine_state: switch.vaskemaskin
  ulm_custom_washer_grid_job_state: sensor.vaskemaskin_washer_job_state_job_state
  ulm_custom_washer_grid_completion_timestamp: sensor.vaskemaskin_washer_completion_time

and the code for the UI:

button_card_templates:
  icon_info:
    color: var(--color-theme)
    show_icon: true
    show_name: true
    show_label: true
    size: 20px
    custom_fields:
      notification: |
        [[[
          if (entity.state =='unavailable'){
            return `<ha-icon icon="mdi:exclamation" style="width: 12px; height: 12px; color: var(--primary-background-color);"></ha-icon>`
          }
        ]]]
    state:
      - styles:
          custom_fields:
            notification:
              - border-radius: 50%
              - position: absolute
              - left: 24px
              - top: '-2px'
              - height: 16px
              - width: 16px
              - border: 2px solid var(--card-background-color)
              - font-size: 12px
              - line-height: 14px
              - background-color: |
                  [[[
                    return "rgba(var(--color-red),1)";
                  ]]]
        value: unavailable
    styles:
      card:
        - border-radius: 21px 8px 8px 21px
        - box-shadow: none
        - padding: 0px
      grid:
        - grid-template-areas: '"i n" "i l"'
        - grid-template-columns: min-content auto
        - grid-template-rows: min-content min-content
      icon:
        - color: rgba(var(--color-theme),0.2)
      img_cell:
        - background-color: rgba(var(--color-theme),0.05)
        - border-radius: 50%
        - place-self: center
        - width: 42px
        - height: 42px
      name:
        - align-self: end
        - justify-self: start
        - font-weight: bold
        - font-size: 14px
        - margin-left: 12px
      label:
        - justify-self: start
        - align-self: start
        - font-weight: bolder
        - font-size: 12px
        - filter: opacity(40%)
        - margin-left: 12px
      state:
        - justify-self: start
        - align-self: start
        - font-weight: bolder
        - font-size: 12px
        - filter: opacity(40%)
        - margin-left: 12px
  custom_washer_state_job_state_grid_item_list:
    styles:
      card:
        - box-shadow: none
        - padding: 0px
        - border-radius: var(--border-radius)
        - pointer-events: none
        - background-color: rgba(var(--color-theme), 0.05)
        - justify-items: center
      grid:
        - grid-template-areas: '"item1 item2 item3 item4"'
        - grid-template-columns: 1fr 1fr 1fr 1fr
        - grid-template-rows: min-content
        - column-gap: 7px
        - justify-items: center
      img_cell:
        - justify-items: center
  custom_washer_state_grid_job_state_item_list_items:
    show_icon: true
    show_name: false
    size: 20px
    tap_action:
      action: none
    styles:
      card:
        - box-shadow: none
        - padding: 0px
        - border-radius: 50%
        - place-self: center
        - height: 42px
        - width: 42px
        - pointer-events: auto
        - background-color: transparent
      grid:
        - grid-template-areas: '"i"'
      icon:
        - color: var(--color-theme)
  custom_washer_state_grid_state_item_list:
    styles:
      card:
        - box-shadow: none
        - padding: 0px
      grid:
        - grid-template-areas: '"item1 item2"'
        - grid-template-columns: 1fr 1fr
        - grid-template-rows: min-content
        - column-gap: 7px
  custom_washer_state_grid:
    styles:
      card:
        - border-radius: var(--border-radius)
        - box-shadow: var(--box-shadow)
        - padding: 12px
      grid:
        - grid-template-areas: '"item1" "item2"'
        - grid-template-columns: 1fr
        - grid-template-rows: min-content  min-content
        - row-gap: 12px
    custom_fields:
      item1:
        card:
          type: custom:button-card
          template: custom_washer_state_grid_state_item_list
          custom_fields:
            item1:
              card:
                type: custom:button-card
                template:
                  - icon_info
                entity: '[[[ return variables.ulm_custom_washer_grid_machine_state ]]]'
                icon: mdi:washing-machine
                name: Washing machine
                tap_action:
                  action: more-info
                label: not running
                state:
                  - value: 'on'
                    label: running
                    styles:
                      icon:
                        - color: rgba(var(--color-blue), 1)
                      img_cell:
                        - background-color: rgba(var(--color-background-blue), 0.2)
            item2:
              card:
                type: conditional
                conditions:
                  - entity: >-
                      [[[ return variables.ulm_custom_washer_grid_machine_state
                      ]]]
                    state: 'on'
                card:
                  type: custom:button-card
                  template:
                    - icon_info
                  entity: >-
                    [[[ return
                    variables.ulm_custom_washer_grid_completion_timestamp ]]]
                  icon: mdi:progress-clock
                  tap_action:
                    action: none
                  label: >-
                    [[[ return
                    states[variables.ulm_custom_washer_grid_completion_timestamp].state
                    ]]]
      item2:
        card:
          type: custom:button-card
          template: custom_washer_state_job_state_grid_item_list
          custom_fields:
            item1:
              card:
                type: custom:button-card
                icon: mdi:scale
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: weightSensing
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item2:
              card:
                type: custom:button-card
                icon: mdi:waves
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: wash
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item3:
              card:
                type: custom:button-card
                icon: mdi:water
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: rinse
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey
            item4:
              card:
                type: custom:button-card
                icon: mdi:fan
                template: custom_washer_state_grid_job_state_item_list_items
                entity: '[[[ return variables.ulm_custom_washer_grid_job_state ]]]'
                state:
                  - value: spin
                    styles:
                      icon:
                        - transform: scale(1.2)
                        - color: black
                      card:
                        - background-color: grey

Whereas the original card looks like this:

I would like the timestamp in the custom card to look like just like the original card: “XX minutes/hours left”

And I just want the “Job state” and “Machine State”

You can have a look at my version, made long time ago, maybe not as fancy as here

I’ve took the code from @rphlwnk, enhanced it and made it a custom card in minimalist, so it can be reused by others: Washer/Dryer/Dishwasher Custom-card - UI Lovelace Minimalist

Thnx @rphlwnk for the design!

1 Like

Hi , got this error

Configuration errors detected:
bad indentation of a mapping entry (30:63)

27 | … [“sensor.washingmachine_energy”].attributes.unit_of_measurement;
28 | … lue + " " + measurement;
29 | …
30 | … _running: “[[[ return states[“sensor.remaining_time”].state; ]]]”
-----------------------------------------^
31 | … _configuring: >
32 | …

1 Like

Hi @Cruguah,
Already thank you for putting the code in minimalist UI, it’s a great job and I start to use it. Really great design, love it !

A question about your code, how do you change the icon of the card?
I tried to adapt it several times but it didn’t work. I’ve always the “flash” icon.
The only way I found is to change the icon in my entity “switch”, directly in the integration.

Don’t we have an uml variable for the icon?

2023-04-19_13-40-21

Hello Kev14,

I didn’t add an icon variable in this card. The icon is used from the power variable (ulm_custom_card_washer_power) and if you change in manualy to the icon that you what, it will show up in the card.
Mine is set to mdi:washing-machine and mdi:tumble-dryer.

Hope this helps.
Kind regards,
Cruguah