Hello, absolute beginner here (running HA/NodeRed for 3 days now).
So I just installed a Shelly 2.5 for one of my roller shutter and I already made some flows with it. But now I’m running into a probably simple problem (for you guys) that I just can’t solve myself.
I simply want to use the “current state” node to check the current position of the Shelly. This information is stored in “data.attributes.current_position” ->
How do I use this now? I tried it several ways, but I guess I’m too stupid Guessing that Im doing it completely wrong? I want to use it like “IF the current Position of the Shelly is at 90”
The background is, that I never completely close my roller shutters. My personal “closed” is at 85%. But obviously the Shelly entity itself shows “open” and only switches to “closed” if its at 100%. So I want a Flow like
“some imput” -> “current state: Is the shelly roller shutter at 85%?” -> IF YES -> Do This
Has this syntax changed?
Currently, I am unable to get node red to pay attention to any attribute for state changed node, it will only look at whether it is on or off.
Also the node is not sending information to the debug when the attribute changes. The state of the entity is always on idle. How can the change in the attribute from ‘off’ to ‘on’ force the node to send a payload?
@kermit from the JSON value you have given in the example, is it possible to reference another entities value, eg inpute_number? ie evaluate IF the current position is less than the input_number wanted position THEN output true? Would the following work?
Does anyone know how to fix the issue with the call-back error in the latest version of NR?
I have JSONata expression = $entity().attributes.current_position > 20
But it no longer passes a true/false and throws a debug error = Error: JSONata Error: Calls to RED.util.evaluateJSONataExpression must include a callback.