I have set up an automation to send an alert when the solar PV batteries start discharging above 1kW. This is so I can work out what is drawing the power and stop it if required. I have added a delay as the power use may initially be high but then go down and back up over the threshold and I don’t want it to trigger the alert every time for this one device. This is what I have currently but I still get constant triggers each time the power goes over the threshold:
alias: Battery discharge over 1kW
description: Battery discharge > 1kW
trigger:
- platform: numeric_state
entity_id: sensor.battery_discharge
above: 1
condition:
- condition: time
after: "05:29:00"
before: "23:31:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: notify.all_phones
data:
message: Battery is discharging >1kW
- wait_for_trigger:
- platform: numeric_state
entity_id: sensor.battery_discharge
below: "0.5"
timeout:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
continue_on_timeout: false
mode: single