I am looking for a way to get a more advance trigger or condition in some automations or conditions.
Temperature: It is easy to trigger by temperature. Does anyone have an idea to advance the automation to detect the change direction. Currently, the automation triggers when the temperature increases to the target and again when it decreases back to the target.
Energy Detection. I am trying to get an automation for when the coffee is done brewing…
Thanks for the suggestion. It is very much like my last try. Only problem is that for some reason the energy monitor detects something at various times and then it clears activation the automation. Thus what I was hoping to achieve is a method to detect the current increase from coffee start (Activation) then the delay that the power was decreased to 0 for 30 seconds. Here is what I currently have:
alias: coffee
id: coffee
description: Coffee Monitor
trigger:
- platform: numeric_state
entity_id: sensor.kasa_smart_plug_151_current
for:
hours: 0
minutes: 0
seconds: 30
below: '0.5'
condition: []
action:
- service: notify.alexa_media
data:
message: >-
Good Morning! The best part of wakeing up, is Folgers in your cup! Come
and get it!
title: Coffee Notification
target:
- media_player.kitchen
- media_player.bed_room
- media_player.computer_room
data:
type: announce
mode: single
@vingerha had a suggestion that is in line of what I am looking for, unfortunately, I am not able to determine the required syntax for his suggested condition:
if they are literally just spikes here is what I think might work:
trigger the automation on the power going above 1000w for several seconds (based on it being long enough to filter the spurious signals).
then in the actions use a wait for trigger to go below some value (you used .5 above) before the notification is sent.
You might need to use a timeout as well but that’s up to you.
something like this:
alias: coffee
id: coffee
description: Coffee Monitor
trigger:
- platform: numeric_state
entity_id: sensor.kasa_smart_plug_151_current
for:
hours: 0
minutes: 0
seconds: 30
above: 1000
condition: []
action:
- wait_for_trigger:
- platform: numeric_state
entity_id: sensor.kasa_smart_plug_151_current
for:
hours: 0
minutes: 0
seconds: 30
below: '0.5'
timeout:
minutes: 15
continue_on_timeout: false
- service: notify.alexa_media
data:
message: >-
Good Morning! The best part of wakeing up, is Folgers in your cup! Come
and get it!
title: Coffee Notification
target:
- media_player.kitchen
- media_player.bed_room
- media_player.computer_room
data:
type: announce
mode: single
be aware tho that if HA restarts during the time the automation is waiting for the trigger the automation will be reset and won’t perform the notification.
but (depending on how vital your coffee notification is… ) it doesn’t seem like the end of the world if the automation fails to notify you your coffee is done.
there are ways around that too but it gets more complicated.