Triggering but within the threshold - so shouldn't

Hi all,

Read up that triggers occur once the threshold is crossed i.e. if you are within the threshold then no trigger occurs - which is what I want.

A shelly plug triggers an automation because of a variation in its wattage draw. But it’s below the threshold so shouldn’t ? ( unless I am misunderstanding triggers ).
Checked the doc’s and I think I’m correct in what I am assuming.

You can see at around 3:30am the current draw changes which does trigger the automation based on the numeric state of ‘power’ - but it’s below the threshold…

Any help on something that’s probably very simple appreciated.

Post the automation trace instead

What you have explained about how you think triggers work is actually true for a numeric state trigger.

But it looks like you aren’t using a numeric state trigger but a device trigger? it’s hard to tell from a screenshot of a trigger in the UI.

that’s why everyone is told to not post screenshots but to post the actual yaml of the automation.

Ah!, apologies didn’t realise screenshots not the best.

id: '1732198102780'
alias: Lightwell with projector ON
description: ''
triggers:
  - type: power
    device_id: 699b544b6005ceae8b77bf4abc73b487
    entity_id: 587b03b79a57c0eee1ad63bfbc30353c
    domain: sensor
    trigger: device
    below: 50
conditions:
  - condition: sun
    before: sunrise
    after: sunset
actions:
  - type: turn_on
    device_id: ae59693df7ee1b2a5a89c87f92da4315
    entity_id: f2a759b6276ff30344d5346c990cf14a
    domain: switch
mode: single

Ok . I’v changed it to the power entity of the Shelly switch as a numeric state .

But I’m confused ! What is Shelly power of the device if not a numeric state ???

Naturally device.power I would assume is a numeric .
But now I have
Entity.power as a numeric state ( which I assume is correct ) .

Clearly I’m confused :face_with_diagonal_mouth:

The state of any entity is a string. If you want to convert it to a number (a float type) and compare it to another number, that is exactly what the numeric state trigger does.

Thanks I see .
Assumed as power is a ‘value’ would be a numeric - so it’s a string - got it !
Still seems strange to have 2 values for the same thing when a function could convert string to numeric though….
Appreciate the explanation