gbond
2 March 2020 11:35
1
object
deviceId: "db1241be-ca6c-46d1-9606-9067fbc128ba"
deviceType: "switch"
name: "lounge colour2"
value: 0
this is what I get from my msg.payload can anyone tell me how I can test what the "Value:" is
I guess i can use the switch node but I can't see how to pick up on the Value (or for that matter any of the other info"
I hope this make sense
kuema
2 March 2020 11:42
2
You were on the right track. Simply use the switch
node and access the payload properties according to your data.
msg.payload.value
, msg.payload.name
, ....
Note that object properties are case-sensitive, so value
and Value
would be different.
gbond
2 March 2020 11:46
3
off coarse thank you so much I though it should be simple
I see you've solved your issue, but take a look at the working with messages part of the documentation too. It's always a good idea to get familiar with it
1 Like
system
Closed
1 May 2020 12:11
6
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.