This Home Assistant automation notifies you when a device connected to a smart plug (e.g., washing machine, coffee maker, etc.) finishes its cycle. It monitors real-time power consumption to detect when the device stops operating and sends a visual notification to your TV or Android device. Ideal for energy savings and daily convenience.
🔧 Built with YAML
📡 MQTT Compatible
💡 Energy Efficient
📺 Supports Android TV & Mi TV
![]() |
The Tuya Smart Plug Zigbee TS011F is an affordable smart plug with decent real-time monitoring responsiveness. In simple terms, data updates are relatively fast (around 10 seconds). While not perfect, it's sufficient—you'll receive the notification about 10 seconds after your laundry finishes. |
---|
When the washing machine is idle and turned off, the Tuya Smart Plug Zigbee TS011F shows a value of "0 watt." Any reading above "1 watt" means the washing machine is on. This condition triggers the automation:
alias: HASS PLUG NOTIFICATION
description: ""
triggers:
- platform: numeric_state
entity_id:
- sensor.steckdose_002_wohnwand_power
above: 1
for:
hours: 0
minutes: 0
seconds: 10
conditions
block, as the condition is embedded in the actions.
Once power consumption drops below 1W for 5 seconds, a notification is sent:
actions:
- wait_for_trigger:
- platform: numeric_state
entity_id:
- sensor.steckdose_002_wohnwand_power
below: 1
for:
hours: 0
minutes: 0
seconds: 5
continue_on_timeout: false
- service: notify.mitv
metadata: {}
data:
message: Washing machine finished !!!
title: "Home Assistant Service:"
data:
position: top-left
transparency: 50%
color: black
interrupt: 0
fontsize: medium
duration: 10
The notification is sent to Android TV using Notifications for Android TV.
The automation monitors the plug's power usage. If it exceeds 1W, the washing machine is on. When it drops below 1W for 5 seconds, the cycle is complete, and a notification is sent.
alias: HASS PLUG NOTIFICATION
description: ""
triggers:
- platform: numeric_state
entity_id:
- sensor.steckdose_002_wohnwand_power
above: 1
for:
hours: 0
minutes: 0
seconds: 10
conditions: []
actions:
- wait_for_trigger:
- platform: numeric_state
entity_id:
- sensor.steckdose_002_wohnwand_power
below: 1
for:
hours: 0
minutes: 0
seconds: 5
continue_on_timeout: false
- service: notify.mitv
metadata: {}
data:
message: Washing machine finished !!!
title: "Home Assistant Service:"
data:
position: top-left
transparency: 50%
color: black
interrupt: 0
fontsize: medium
duration: 10
mode: single
Creating a binary sensor simplifies the process and allows visualization of the device's state on your room map.
-
In the "State template*" field, enter:
{% if states('sensor.steckdose_002_wohnwand_power') | float == 0 %}
off
{% else %}
on
{% endif %}
float == 0
sets a default value because without it, the sensor would returnnull
, which is problematic forINT
(integer) sensors. This is a simple example where a power reading above 0 means the device is on; otherwise, it's off.
Assign the sensor to the correct device, and you're done:
- If you liked this project, check out HERE for more interesting repositories I've created.
- If you encounter issues or have questions, feel free to reach out.