1) Give a description of the problem
First off, I’m very new to both webcore and smartthings. I customized the device handler for the multi-sensor to add some additional attributes. All that is working fine and I can access the new attributes in webcore. I have a question though about one part of the functionality. The attributes are defined as follows:
attribute "motionAverage", "number"
attribute "motionCount", "number"
My question is, when I set these attributes to be zero, webcore does not see them as zero but instead as null. It seems strange that I can’t set a “number” attribute to zero and have it be returned as a number in webcore.
It’s not really a big deal since I can use int and float as my code shows, but I am wondering, am I doing something wrong or is this expected behavior?
2) What is the expected behavior?
For the attribute to return 0
3) What is happening/not happening?
It’s returning null instead of 0
4) Post a Green Snapshot of the piston
5) Attach any logs (From ST IDE and by turning logging level to Full)
2/10/2019, 8:43:05 PM +232ms
+135ms ║dth:
+157ms ║dth:
+181ms ║force: 0
+204ms ║force: 0
2/10/2019, 8:42:05 PM +230ms
+360ms ║dth: 0.23792630302838122
+386ms ║dth: 41
+412ms ║force: 0.23792630302838122
+447ms ║force: 41