Hello,
I have a light sensor which is using the state changed node. I specified a value as a threshold
But what I want to do is to pick up this value from a helper in home assistant.
I tried this but it does not work am I missing something?
Hello,
I have a light sensor which is using the state changed node. I specified a value as a threshold
But what I want to do is to pick up this value from a helper in home assistant.
I tried this but it does not work am I missing something?
Often you can use a $entities expression in the fields, so try to set the type to expression and type this in the field:
$number($entities(“input_number.office_light_trigger_level”).state)
I used this exact expression
The control in HA
is having no influence on my flow running and I can’t even put that expression into an inject node to see whats going on as $entities only works with HA nodes.
Any ideas what might be going on here?
I used a poll state node to see what was going on with the entity, looks fine to me but does something need to happen to pull the entity value into node-red frequently or does the expression just do that?
It should be working, but try to use global instead then.
Set it to
homeAssistant.states[“input_number.office_light_trigger_level").state
Lets see if that works.
@WallyR thanks for that information, there was a slight error in your syntax I think.
I’ve got it working using the global.
with the expression
homeassistant.homeAssistant.states[‘input_number.office_light_trigger_level’].state
Thanks for your help I just needed that pointer
Perfect.
I did not have time to test it, so just copied the path with the icon for that and sometimes the the first level in the path is skipped by that feature.