ckamps / hubitat-driver-ha7net

Hubitat Drivers for HA7Net and 1-Wire Devices
0 stars 1 forks source link

Check for empty values when HTML response element matched #1

Closed ckamps closed 4 years ago

ckamps commented 4 years ago

Ensure that the content in the value attributes of matched Humidity_0 and Temperature_0 elements is not empty so that downstream code doesn't attempt to process invalid or not present data.

See the following line for an example where a value is returned without checking first to see if it's non-empty:

https://github.com/ckamps/hubitat-drivers-ha7net/blob/master/ha7net-child-humidity.groovy#L82

ckamps commented 4 years ago

Fixed by adding checks for empty sensor value attributes and throwing an exception.