Laundry Panel and Cast Automation

I realized that I posted this buried in an obscure thread, so I thought I’d repost in this category (see original here)

I wanted better information about the state of my laundry whenever I’m running it. I tend to forget to check, and the notification from LG’s SmartThinq app is easy to miss. Asking Google how much time is left can routinely take more than 20 seconds to get an answer. I thought to myself “Self, there’s got to be a better way!”

Lovelace UI

I’ve implemented a nice UI, using picture-elements cards, along with a couple state-label elements and the images for my specific machines, downloaded directly from Home Depot’s website.

Here’s what the yaml looks like for the washer. The dryer is the same setup, but with the sensor.dryer entity instead. Images are from the home depot website, but I shrank the resolution down to 300x300px to fit my screen better.

elements:
  - entity: sensor.washer
    icon: 'mdi:power'
    style:
      left: 25%
      top: 10%
    type: state-icon
  - attribute: remain_time
    entity: sensor.washer
    style:
      color: white
      font-size: 2em
      right: 12%
      top: 10%
    type: state-label
  - attribute: run_state
    entity: sensor.washer
    style:
      bottom: 5%
      font-size: 2em
      left: 50%
    type: state-label
image: local/washer.png
type: picture-elements

Automations
Cast Laundry Status
This automation will cast the laundry panel (just a panel view of the above card) to my kitchen Google Nest Hub if it’s not currently in use.

- id: '1586875085605'
  alias: Cast Laundry Status
  description: ''
  trigger:
  - entity_id: sensor.washer
    platform: state
    to: 'on'
  - entity_id: sensor.dryer
    platform: state
    to: 'on'
  condition:
  - condition: template
    value_template: '{{ not is_state(''media_player.kitchen_display'', ''playing'')
      }}'
  action:
  - data:
      entity_id: media_player.kitchen_display
      view_path: laundry-panel
    service: cast.show_lovelace_view

Load Finished
This automation lets me know when a load has finished. I have one for the washer and a second for the dryer, but you could potentially combine them into one. I’ve only posted the washer.

- id: '1586883670684'
  alias: Washer Finished
  description: ''
  trigger:
  - entity_id: binary_sensor.washer_wash_completed
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: media_player.kitchen_display, media_player.upstairs_hall
      message: The washer has finished a cycle
    service: tts.google_say
4 Likes

would be nice if you also added how you got this far

Take a look at the linked thread, lots of info in there. If that doesn’t help, what can I help you with? I installed the integration from the HACS, then followed the setup instructions. Please reply if you have questions or want more info. :slight_smile:

yes lots of info

what i looked after was a guide on how you did

ie step1 do this
step2 do that

Once you have the integration installed it is easy.

Create www folder under config and upload a washer/dryer image.

Go to your dashboard, add new card. Select picture elements card, copy the above code (elements to type) and paste it. Then update your image name to local/YOURNAME and update the sensors accordingly.

Hope that helps!

1 Like

Just wanted to say thanks for putting this together.

Everything is working for me mostly but doesn’t seem to want to cast to my kitchen hub. I had to rename the “View” since mine is different from yours but still no dice. I’ll need to play around with it a bit more to get it figured out.

Thanks again.

What does it show when it fails to display? I had to add a workaround to get it to cast the view correctly, and even then, it doesn’t always work.

Here’s my automation yaml:

alias: Cast Laundry Status
description: ''
trigger:
  - entity_id: sensor.washer
    platform: state
    to: 'on'
  - entity_id: sensor.dryer
    platform: state
    to: 'on'
condition:
  - condition: not
    conditions:
      - condition: state
        entity_id: media_player.kitchen_display
        state: playing
action:
  - data: {}
    entity_id: media_player.kitchen_display
    service: media_player.turn_off
  - delay: '00:00:01'
  - data: {}
    entity_id: media_player.kitchen_display
    service: media_player.turn_on
  - data:
      dashboard_path: lovelace-cast
      entity_id: media_player.kitchen_display
      view_path: laundry
    service: cast.show_lovelace_view
mode: single

Aaaaaaaaaaaaand, it’s gone.

south-park-its-gone

Google decided to stop the cast after 10 minutes of duration, so this automation isn’t much use anymore. Thanks, Google.

/sarcasm