#Node-Red automation to compare to numbers doesn't work

1 messages · Page 1 of 1 (latest)

void perch
#

I want to compare 2 number entities and if 1 becomes lower than the other, an action has to be activated.
I have a home battery that gives the capacity in % sensor.battery_state_of_capacity```
I made a slider nput_number.batt_ontlaad_stop''.
When the input_number is reached, the action has to be triggered.
As input I have inject node that triggers every 20 seconds.
On the output I placed a debug node but nothing comes in.
Under the node the state of capacity is shown.
What's wrong and what to change please?

#

If I change the 'If State' to a fix number, the automation works... What's wrong?

void perch
#

Nobody who can help me with above?

void perch
#

Would be nice if someone has an idea how to fix this...

viscid snow
#

There are probably not many node-red users here. I personally use the HA automation system, and therefor I can't help you

void perch
#

In the past I had great Node-Red support here so I hope someone can chase me in the right direction....

frail glen
#

Hi @void perch would you please post what a complete msg debug node shows for both the sensor and your input helper?

#

And, fwiw, as a very visual person, I much prefer NR, and it has been a great prep for now using tools such as N8N. But that's what's great about HA... Plenty of ways to get things done that best suit you.

zenith belfry
#

Can you also post a screenshot of your flow so we can see basically what you have set up?

#

This might be an instance where writing a (relatively) simple function to do exactly what you want could be used.
I've moved most of my automations away from NR and into HA. In fact, I really only have one automation that I can't seem to replicate in HA and, because it works, it still runs in NR. But, I used to write little functions that would essentially combine multiple nodes and do specifically what I needed.

void perch
#

No idea if this is helpfull but this is my flow. Only problem I have is as described above. The Current State Node 'Auto laden tot aangegeven thuisbatterij slider' doesn't work. When I use fix number instead of entity 'input_number.batt_ontlaad_stop' it works...

frail glen
#

Happy to help but the node name language in the screenshot is a challenge. Can you share the json export via pastebin?

void perch
#

Thanks for your help!

frail glen
#

My pleasure, traveling now, hopefully can take a look in the next 24hrs or so. Thx for your patience.

void perch
#

Hi @frail glen any chance to check my flow after your return?