toggledbits / SiteSensor

SiteSensor plug-in for Vera Home Automation Controllers
GNU General Public License v3.0
3 stars 0 forks source link

Change subkey references to return null if not found rather than runtime error #5

Closed toggledbits closed 6 years ago

toggledbits commented 6 years ago

There are times when data could be missing from an API response, so to give expressions a clean way to handle that, subkey references should be changed so that they return null rather than throw a runtime error. This null result could then be detected, such as by the if() function, to provide a default expression result in the absence of the data sought.

toggledbits commented 6 years ago

Implemented in develop branch--updated version of luaxp in place (the actual changes required to support this were in luaxp, not SiteSensor itself).

toggledbits commented 6 years ago

Released in v1.8