I have the HomeSeer add-on and Am able to switch on and off an Z-wave device, using an injection node. Now I want to have this extended and get an Automation in place. So My thought was using an Noder-red(HA) Swich node. And have that linked to the device instead of the inject nodes. That is not working. How to get this done?
$entity().state ? "On" : "Off"
{"value": $entity().state ? 255 : 0 }
tried this. but it is throwing an error.
this is what I get when using the inject button (which works). So did I miss some settings needed to add in the string you prepared?
What are your inject nodes outputting that is valid?
I’ve got it working. Might be my mistake, there was still mentioned msg.payload.value and than again in the string, which also had “value”. Guess that messed things up.
Although it is working… Great I wonder why I now get value 255 when switching off and 0 when switching on? I would expect the other way around, as which is in the inject node? Or is it reading the state the switch is having after the switching? Than it make sense…
Does not matter if it works it works but try to learn understand what happens here .
so when the switch is set to on: It shows below debug holding the 0 which is the off position right? I will try to reverse them see if that makes it more logic (for me at least