I have a espresso machine (pluged in to a Shelly enegry metering WiFi relay) that goes into a heating cycle every 4 to 5 minutes for 30 seconds. With automated time base shutdown I can make sure that the macine is using under 5 W of power. For that I use the following automation:
alias: turn of coffee machine at 18:00 if power is under 5W and try again in 2 minutes
description:
trigger:
- platform: time
at: "18:00:00"
- platform: time
at: "18:02:00"
condition:
- condition: device
type: is_on
device_id: 790e2fcad3177fa66b897xxx
entity_id: 43fa57a2d840aa67290bbxxx
domain: switch
- type: is_power
condition: device
device_id: 790e2fcad3177fa66b897xxx
entity_id: 61ab9d154a9050e501edxxx
domain: sensor
below: 5
action:
- type: turn_off
device_id: 790e2fcad3177fa66b897xxx
entity_id: 43fa57a2d840aa67290bbxxx
domain: switch
mode: single
When I manually switch the machine off (by pressing a button on frontend) I would like to:
- make sure power consuption is below 5 W
- If not, wait for power consuption to be under 5 W
- Turn power off
I have tried a bunch of automations with out luck. What do you suggest I should do? Use a helper or template? What type…?
Thanks!