#I can't select a "for how long" time for a numeric state???

1 messages · Page 1 of 1 (latest)

median apex
#

How do i make a automation condition of a numeric state for a specific amount of time?
So if entity X is below 500 for 1 minute?

uncut pier
#

It's not possible, because that information is not retrievable from the state machine.

#

If you need that, make a template binary sensor for below 500.
Then you can test if that is on for one minute.

median apex
#

ugh.

#
    - name: Basement Car Charger Above 100 Watts
      state: "{{ is_state_attr('sensor.basement_car_charger_power', 'value', > 100) }}"```
is not working
late island
#

Nor should you expect it to. Did that come from AI?

#

Assuming that attribute is a float and not a string, you can do {{ state_attr('sensor.basement_car_charger_power', 'value') > 100 }}

median apex
median apex
#

not working. says unavailable.

#

the entity im using for it is simply a number. the wattage of a smart plug

#

a value in watts

late island
#

So it’s the state, and not an attribute?

#

{{ states('sensor.basement_car_charger_power') | float(0) > 100 }}