Do you have the custom integration installed in HA?
I have seen that mentioned. But its very confusing. So basically you can have the nodes installed as part of node red supervisor add on instal. But this node wont actually do anything without this add on that needs to be installed in from the HACS store?
Thats weird?
Ahh ok
I just started comparing the node doco and seen this and the link. Ok got it!
Thanks Kermit
First of all, thanks Mike for this tip!
It took me FOR EV ER to get things installed but now I have added an entity node in NodeRed. I deployed. The node says āregisteredā under it with a date and time. But I cannot find it in Entities! Am I dumb or something something wrong?
Did you ever figure this out?
So I wasnāt reading it properly before, hence not understanding that it needed the companion part installed from HACS.
Thatās done,
But I still canāt create entities using this node.
It should be as simple as adding the node and hitting deploy? Or am I missing something else?
Thanks guys
I had an old draft saved with this info, It might help you.
BUT!!!
In the end I used an input Boolean because the entity never appeared for me
If you want to create a switch or sensor inside HA youāll need the HACS add on. Then add it to your integrations.
You will see the node red companion, your entities can be found here.
I have 3 switches here to change a profile in blueiris by mqtt flow in nodered.
Now Iām wondering how to make one switch turn off if another one is turned on.
Daytime and Home profiles cannot both be on, If Home is on then Daytime needs to be OFF in homeassistant. Tried to insert OFF to the beginning of the nodered entity but did nothing in HA.
Had to add an extra call service on the on output to switch the other off. Maybe can only be done this way. Bit messy though
I understand you want to achieve something like radio-buttons do, isnāt it?
Then turning one on, then intercept this in NR in order to turn off other ones is not an option because more switches will be turned on at the same time for a fraction of second
I recently started to use svc2evnt HACS addon (you need to add its repo to HACS). It allows to generate an event (with customized data). You can intercept this event in NR, then make needed actions (disabling all switches, enabling one).
Not sure itās doable with vanilla lovelace. Iām using custom button card which is capable to call services (incl triggering events)
In fact this method (svc2evnt) is very powerful and usefull, allowing you to inform NR about various things without need of creating intermediate switches or sensors.
Thanks Iāll have a look into that later.
I have managed to achieve what I needed today, but messy and time consuming.
Hey, thanks for the information.
Is there any option to send data from an input or slider? I want to define a time value through a slider and start then the flow with the value. Is is possible and how?
Iāve got the NR entity node configured as a switch. It has 2 outputs. When I run an Automation that turns the switch on or off (service: Switch: Turn on/off) it works and the text under the node shows that. So far so good.
The problem Iām having is that I then want it to trigger the next node which sends a Notify to my Amazon Echo. But nothing is coming out of the Switch node.
I have confirmed the Notify node works with a Timestamp inject.
I have attached a debug node to the output of the Switch node and it shows nothing.
What am I doing wrong?
Check that box
edit: left out the important part. Set the output to J;expression
and use
$entity().state ? "on":"off"
On the NR Entity node set as a Switch, there is no such check box.
It does
See if that loads
[{"id":"92cde6be82930449","type":"ha-entity","z":"f80b6c338afd5483","name":"","server":"6b1110b5.183a4","version":2,"debugenabled":false,"outputs":2,"entityType":"switch","config":[{"property":"name","value":""},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"msg","inputOverride":"allow","outputOnStateChange":true,"outputPayload":"$entity().state ? \"on\":\"off\"","outputPayloadType":"jsonata","x":550,"y":500,"wires":[[],[]]},{"id":"6b1110b5.183a4","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]
If not are all your components up to date? Nodered companion(hacs),NR addon, and ha nodes( goto manage pallete and search websocket. Look for the HA nodes in the list and click update if available.
If that does not yield results remove and reinstall. Backup flows and NR. Stop NR, remove NR, goto /config
rename folder to node-red.old
. Reboot the sysytem ā settings, hardware, pi, three dots top right, reboot host. Or however you reboot your hardware at an os level. Then reinstall.
Ah, They were not up-to-date but are now!
Yes it works now with a trigger coming from the top output when turned on and the bottom output when turned off. So the conditional is not needed.
Thanks.
Thanks for the sample, I was trying to do the same and got it working. Now I wonder how can do the same by clicking on the HA actions? I use HA action defined in the configuration.yaml and the event actions on done in node-red, but not sure how to do this. any help would be appreciated. Thanks.
Hello to all. Thank you for this tips, but Iām stuck and canāt go on. I installed the add on from HACS and created a button on my lovelace
with this button Iām going to call this flow that I have in my node-red
which is a physical button that I have in my living room (FLIC button) that turns on or off some lights when pressed.
My problem is that it is not clear to me how to set in node red type switch