Automation to notify when above certain kWh state

Hi,

I’ve researched some older topics but they did not meet the exact thing I’m looking for.

I’ve got a super simple automation that just notifies me when the value of a sensor is above the 7kWh mark.

However, it seems like it’s not working.

alias: PV - Melding wanneer er meer dan 7kWh is opgewekt door de panelen.
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.pv_productie
    below: 7
conditions: []
actions:
  - action: notify.notify
    metadata: {}
    data:
      title: Teruglevering
      message: Er is op het moment >7kWh opgewekt, zet elektrische apparaten aan!
mode: single

It should send me a notification on my phone once it crosses the 7kWh mark. But it didn’t :frowning:

The current value is 20kWh for today, so it did pass. I am doing something super simplistic but I can’t seem to find my error here. Somebody who can shine a light on my issue?

Bruh, I’m just reading through my post and I see I state it as below 7 rather than above 7… just changed it and will monitor it tomorrow.

2 Likes

Glad you caught that. Was about to tell you about it!

You can set the state to be above 7 right now. Just go to dev tools & click on the entity, then set the state to 8. Don’t worry, it’ll jump back to it’s actual value when your PV next sends a report

2 Likes