I have been working on my first app, and its working pretty good.
I have modified “It’s Too Cold” so I can have a temp range and get notified it we go above/below this range…works well.
My simple question as I try to see what else I can do is, how do I get the currentValue of the other sensors…? Do I need to subscribe, or when there is a temperature change, could I not just check the current value of the multi sensor to see the battery status, or the contact, or lqi etc? Just thinking if I am getting notified about the temp, why not add the battery status etc?
“battery” is not a registered property for a standard thermostat. You may have to create a custom device type based off the thermostat example, enhanced to have this additional property. I’ve been referencing this work to understand how custom device types are created: https://github.com/smartthings-users/device-type.nest/blob/master/nest.devicetype.groovy
Attributes represent the various properties or characteristics of a device. Generally speaking device attributes represent a current device state of some kind. For a temperature sensor, for example, ‘temperature’ might be an attribute. For a door lock, an attribute such as ‘status’ with values of ‘open’ and ‘closed’ might be a typical.
This works for me:
log.info(multi.latestValue("temperature"))
Where “multi” is defined as “device.SmartSenseMulti”