Trigger when value higher than 100 for 5min

hi, all I want a notification when the value of the sensor is higher than 100 for 5minutes…
This doesn’t works

trigger:
  - platform: numeric_state
    entity_id: sensor.solar_grid_to_house_w
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: '100'
condition: []
action:
  - service: notify.mobile_app_mi_9
    data:
      message: >-
        Assorbimento anomalo da ENEL, assorbimento {{
        states('sensor.solar_grid_to_house_w') }} W

mode: single

what is wrong?

What is not working?
Is the sensor state already above 100?

The sensor value Is above 100, but no notify…
But if I try the automation, The notification works

So you need to wait, until the value comes down under 100 and back above again…

nothing. doesn’t work…

What is the debug trace telling you?

When you run it separately, the trigger/conditions are ignored, so that is normal. As said before, the sensor must be below 100, and then continuously above 100 for exactly 5 minutes.

the debug is emply…

same result doesn’t work

I edited my text, because I was wrong. But seeing you tested it this quickly, you cannot know it fails yet. As said, the sensor must be below 100, and then continuously above 100 for 5 minutes exactly for the trigger to happen. When the trigger is already above 100 for longer than 5 minutes, it won’t fire. And it falls below 100 for even a split second, the 5 minute delay resets as well.

now it works… I always recharged automations from HA GUI, I performed a reboot and everything works…
thanks to all… this is my final automation:

If the house takes energy for more than 5minutes from the grid and the batteries are charge, there is a problem…

trigger:
  - platform: numeric_state
    entity_id: sensor.solar_grid_to_house_w
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: '100'
condition:
  - condition: numeric_state
    entity_id: sensor.solaredge_battery1_state_of_charge
    above: '5'
  - condition: or
    conditions:
      - condition: numeric_state
        entity_id: sensor.solaredge_battery2_state_of_charge
        above: '5'
action:
  - service: notify.mobile_app_mi_9
    data:
      message: >-
        Assorbimento anomalo da ENEL, assorbimento {{
        states('sensor.solar_grid_to_house_w') }} W
2 Likes