I have two switches named top and bottom. I can see the values changing if I look on the devices tab.
But the rule dosen't want to publish the value.
If I send an event 'sendSensorPosition' from Node-RED it will publish the values correctly.
Any ideas as to what I'm doing wrong would be appreciated.
Code: Select all
On sendSensorPosition Do
event,publishReading
EndOn
On publishReading Do
publish,garagedoor/sensors,'{"level":[top#level],"sensor":"top"}'
publish,garagedoor/sensors,'{"level":[bottom#level],"sensor":"bottom"}'
endOn
On top#level Do
event,publishReading
EndOn
On bottom#level Do
event,publishReading
EndOn