This isn’t really that big a deal, but I had a lot of fun with this, and it actually improved WAF on the HA project because of the duck (yes, there IS a duck)
It’s a simple SONOF POW R2 attached to the washer, with a few automations attached.
There are still some work left, and the animation isn’t perfect, but I can’t find a tool that can crop an animated GIF circular.
Btw. the clock is showing current time
CLICK THE IMAGE to see the screencast of it
The sensors:
- platform: mqtt
name: "Vaskemaskine Strøm"
state_topic: 'tele/washer/SENSOR'
value_template: '{{ value_json.ENERGY.Current }}'
unit_of_measurement: "ampere"
- platform: mqtt
name: "Vaskemaskine Forbrug"
state_topic: 'tele/washer/SENSOR'
value_template: '{{ value_json.ENERGY.Power }}'
unit_of_measurement: "Watt"
- platform: mqtt
name: "Vaskemaskine spændingsforskel"
state_topic: 'tele/washer/SENSOR'
value_template: '{{ value_json.ENERGY.Voltage }}'
unit_of_measurement: "Volt"
- platform: mqtt
name: "Vaskemaskine samlet forbrug i dag"
state_topic: 'tele/washer/SENSOR'
value_template: '{{ value_json.ENERGY.Today }}'
unit_of_measurement: "kWh"
- platform: mqtt
name: "Vaskemaskine samlet forbrug i går"
state_topic: 'tele/washer/SENSOR'
value_template: '{{ value_json.ENERGY.Yesterday }}'
unit_of_measurement: "kWh"
The automations:
- id: '156008'
alias: Vaskemaskine is done
trigger:
- below: '5'
entity_id: sensor.vaskemaskine_forbrug
for: 00:01:00
platform: numeric_state
condition:
- condition: state
entity_id: switch.vaskemaskine
state: 'on'
action:
- data:
entity_id: ' media_player.faellesomrader'
language: da
message: Huhej hvor det går, ligepludselig er vaskemaskinen færdig
service: tts.google_translate_say
- id: '156016'
alias: Vaskemaskine - turn off
trigger:
- below: '5'
entity_id: sensor.vaskemaskine_forbrug
for: 00:10:00
platform: numeric_state
condition: []
action:
- data:
entity_id: switch.vaskemaskine
service: switch.turn_off
But the real fun is the illustration of it all:
Which is made with a picture element card:
cards:
- elements:
- entity: sensor.vaskemaskine_forbrug
style:
left: 38%
top: 85%
type: state-label
- entity: sensor.vaskemaskine_spaendingsforskel
style:
left: 53%
top: 85%
type: state-label
- entity: sensor.vaskemaskine_strom
style:
left: 69%
top: 85%
type: state-label
- entity: switch.vaskemaskine
state_image:
'off': /local/wash-off.png
'on': /local/wash-on.png
style:
left: 51%
top: 18%
tap_action:
action: toggle
type: image
- entity: switch.vaskemaskine
state_image:
'on': /local/display2.png
'off': /local/display.png
style:
width: 20%
left: 68%
top: 18%
type: image
- type: conditional
conditions:
- entity: switch.vaskemaskine
state: 'off'
elements:
- type: state-label
entity: sensor.time
style:
color: yellow
left: 69%
top: 16%
- entity: switch.vaskemaskine
state_image:
'on': /local/washer-animated2.gif
style:
left: 52%
top: 50%
clip-path: circle(38% at center)
tap_action:
action: toggle
type: image
image: /local/siemens-washer.jpg
type: picture-elements
- columns: 1
entities:
- entity: sensor.vaskemaskine_samlet_forbrug_i_dag
- entity: sensor.vaskemaskine_samlet_forbrug_i_gar
show_icon: false
show_state: true
type: glance
type: vertical-stack