I have an automation that is aimed to notify me when my washer is done. I have a Kasa smart plug connected to the washer, and the automation is basically triggered when the plug’s current drops below 2.
The problem with this automation is that it often falsely triggered. When I go into the logs, I see that when it happens, there are missing data points from the plug (see picture below). How can I configure the automation basically ignore missing data points? I tried to add a condition that current should be above 0 but it is still falsely triggered.
This is my automation:
alias: Washer done
description: ""
trigger:
- type: power
platform: device
device_id: 7c65683372901df044ce43c0e2dc31c0
entity_id: sensor.washer_plug_current_consumption
domain: sensor
for:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
below: 2
condition:
- type: is_power
condition: device
device_id: 7c65683372901df044ce43c0e2dc31c0
entity_id: 9bb5b6fd36855c4d92ec6a9658bb4fa6
domain: sensor
above: 0
action:
- service: notify.all_devices
data:
message: Washer is done
- service: media_player.play_media
target:
entity_id: media_player.kitchen_speaker
data:
media_content_id: >-
media-source://tts/tts.google_en_com?message=Washer+is+done&language=en-us
media_content_type: provider
metadata:
title: Washer is done
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: >-
media-source://tts/tts.google_en_com?message=Washer+is+done&language=en-us
mode: single
This is indication of the missing data points from the history graph: