This widget displays the current state of your washing machine together with the time it has been running since the start of the washing.
Configuration is pretty straightforward (see screenshot below):
- Title: Sets the card title if you want one. Leave empty for no title.
- Footer: Sets the card footer if you want one. Leave emtpy for no footer.
- Header: Sets the text above the machine icon.
- Minutes running: Sets the time inside of the machine. This should be evaluated by an expression (e.g. =items.washing_machine_runtime.state).
- State: Can be one of OFF, RUNNING or FINISHED and should be filled in via an expression as well depending on the current state of your machine.
- Dryer Mode (not in the screenshot below): Put the string āONā in here to get a red/orange color scheme that can be used for a dryer.
Have fun
Screenshots
Dryer Mode:
Configuration:
Changelog
Version 0.4
- fixed: Replaced standard preloader component with the replacement as proposed by @Nico_R for my dishwasher widget. This way the look of the washing machine will be the same on iOS and android devices
Version 0.3
- added: dryer mode with a red/orange color scheme
Version 0.2
- fixed: Small bugfix - Minutes < 10 are shown correctly with a leading 0
Version 0.1
- initial release
Resources
uid: washing_machine_v4
tags: []
props:
parameters:
- description: Title of the card
label: Title
name: title
required: false
type: TEXT
- description: The card footer
label: Footer
name: footer
required: false
type: TEXT
- description: Header text above washing machine
label: Header
name: header
required: false
type: TEXT
- description: Expression that evaluates to minutes since the begin of washing
label: Minutes running
name: runtime
required: true
type: TEXT
- description: Expression that evaluates to OFF, RUNNING or FINISHED
label: State
name: state
required: true
type: TEXT
- description: "Dryer mode: Set this to ON for a red dryer color scheme"
label: Dryer Mode
name: dryer
required: false
type: TEXT
parameterGroups: []
timestamp: Oct 2, 2021, 9:24:59 PM
component: f7-card
config:
title: =(props.title)
slots:
default:
- component: f7-card-content
config:
style:
height: 175px
slots:
default:
- component: f7-row
config:
class:
- display-flex
- justify-content-center
style:
width: 100%
slots:
default:
- component: f7-col
config:
class:
- display-flex
- flex-direction-column
- align-items-center
- justify-content-space-evenly
style:
height: 100%
width: 90px
slots:
default:
- component: f7-block-header
slots:
default:
- component: Label
config:
text: =props.header
- component: f7-block
config:
style:
height: 120px
width: 90px
border-radius: 2px 2px 4px 4px
background: rgba(255,255,255,1)
box-shadow: rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px
class:
- display-flex
- flex-direction-column
- align-items-center
slots:
default:
- component: f7-block
config:
class:
- display-flex
- justify-content-flex-end
- align-items-center
- flex-shrink-0
- no-margin
style:
height: 23px
width: 85px
border-bottom: 1pt solid lightgray
padding-right: 10px
slots:
default:
- component: f7-icon
config:
f7: circle_fill
size: 10
color: gray
- component: f7-icon
config:
f7: circle_fill
size: 10
color: gray
- component: f7-icon
config:
f7: '=props.state == "OFF" ? "circle_fill" : "sun_min"'
size: 10
style:
color: '=props.state == "OFF" ? "gray" : "red"'
- component: f7-block
config:
class:
- display-flex
- justify-content-center
- align-items-center
style:
height: 60px
width: 60px
border: 5pt solid lightgray
border-radius: 50%
margin-top: 7px
slots:
default:
- component: f7-block
config:
colorTheme: '=props.dryer == "ON" ? "red" : "lightblue"'
class: custom-preloader-container-dummy
style:
display: '=props.state == "RUNNING" ? "" : "none"'
margin: 0
padding: 0
--f7-preloader-size: 50px
--f7-preloader-color: var(--f7-theme-color)
position: absolute
left: 50%
top: 50%
transform: translate(-50%, -50%)
slots:
default:
- component: f7-block
config:
class: custom-preloader-dummy
style:
margin: 0
padding: 0
width: var(--f7-preloader-size)
height: var(--f7-preloader-size)
slots:
default:
- component: f7-block
config:
class: custom-preloader-inner-dummy
style:
margin: 0
padding: 0
position: absolute
left: 0
top: 0
width: 100%
height: 100%
slots:
default:
- component: f7-block
config:
class: custom-preloader-inner-circle-dummy
style:
margin: 0
padding: 0
border-radius: 50%
border: calc(var(--f7-preloader-size)/8) solid var(--f7-preloader-color)
border-top-color: transparent
box-sizing: border-box
animation: aurora-preloader-rotate 1s linear infinite
position: absolute
left: 0
top: 0
width: 100%
height: 100%
- component: f7-icon
config:
f7: '=props.state == "FINISHED" ? "circle_bottomthird_split" : "circle"'
size: 50
style:
color: '=props.state == "OFF" ? "lightgray" : (props.dryer == "ON" ? "orange" : "lightblue")'
border-radius: 50%
box-shadow: 0 0 16px 8px rgba(0, 0, 0, 0.25) inset
- component: f7-block-header
config:
visible: =props.state == "RUNNING"
class:
- no-margin
style:
position: absolute
slots:
default:
- component: Label
config:
text: '=Math.floor(props.runtime / 60) + ":" + ((props.runtime % 60) < 10 ? ("0" + props.runtime % 60) : (props.runtime % 60))'
style:
color: black
- component: f7-card-footer
slots:
default:
- component: Label
config:
text: =props.footer