#Detecting wattage below certain value

1 messages ยท Page 1 of 1 (latest)

north moss
#

I'm trying to detect when boiler power consumption goes below 100 watts for 30 seconds, which should turn it off. For some reason it just doesn't run the automation.

#

am I using the numeric state trigger wrongly?

autumn tulip
#

Hello @north moss,
that looks to me like it will trigger when it goes above the upper limit of 100...

goes below 100 watts

idle sequoia
north moss
#

is below for 30 seconds though ๐Ÿค”

#

It's been ~1 for like 40 mins

#

is there any way to debug numeric state?

idle sequoia
#

it will only trigger when it goes above then below again. if its a new automation and its been below the entire time its existed then it wont do anything

#

can you put the device on for a moment and then off again to see if it works?

north moss
#

its on atm but its finished heating already so it wont consume above

#

the automation to start it ran though hour ago

idle sequoia
#

nudge the temp setting up a moment?

north moss
#

and it did spike after that

#

could it be cause it spiked for less than 30 seconds or?

idle sequoia
#

should be an issue there

#

sometimes the numeric sensor can be a bit touchy to be fair.

#

you could create a templated binary sensor helper that is "on" when above 100w else "off" then automate off that sensor instead

north moss
#

oh that could work

#

what is it called in the helpers?

#

ah templated

idle sequoia
#

add helper - template - binary sensor

#

this is a random example i have

north moss
#

is that jinja2 templating btw?

idle sequoia
#

yes

north moss
#

sensor.small_boiler_power

idle sequoia
#

you can add class and device to it if you want but its not required

north moss
#

{{ state('sensor.small_boiler_power')|float > 100 }}

#

hmm unavailable

idle sequoia
#

if you add it to a device it shows up on the devices page so its convenient etc... but i made this one in a hurry ages ago so skipped

#

states

#

not state

north moss
#

ope

#

thank you

idle sequoia
#

no worries, i hope it works out for you

north moss
#

and then i can do like when it goes from on to off?

idle sequoia
#

exactly, you now have a basic on/off sensor you can automate from

north moss
#

has to work

north moss
#

thanks again

idle sequoia
#

boom!

#

although calling it "xxx on" bothers me a little ๐Ÿ˜› something like "xxx status" or "xxx state" makes more sense to me... but its your system ๐Ÿ™‚

north moss
#

the lowercase was bothering me

#

it worked

idle sequoia
north moss
#

same flaw actually

#

when it turns it on, if boiler is already heated it wont go above 100watts so the state will remain off

#

any idea how i could make it work?

#

maybe i could start timer for like 20 seconds ๐Ÿค”

#

and make the template power < 100W || timer state on