No event on subscribe, when attribute old value==new value

I write an app in which need to get most current temperature from multiple sensors, so I do .each->refresh.
To my surprise even though I see the temp in device event list, seems app subscribe to "temperature" fires only when there is a change in value. browsing seems it is default behavior, which unfortunately does not fit my scenario:

"by default only events where the new value != the old value are committed to the database."

How I can get the above done?

What exactly is your app trying to do? Please explain your requirements so that the community can assist you the best way possible.

You can always retrieve the current value of any device's attributes, by simply doing something like...

def currentTemp = device.currentValue("temperature")

There is no requirement to receive an event for a value that has not changed. Also, forcing refreshes of battery powered devices will wear out their batteries much quicker. Devices are designed to transfer data only when values have changed significantly enough to warrant the costly radio transmission.

Thanks Ogie, will adopt your suggestion. Otherwise doing smart thermostat app several sensors (avg temp) -> heater(s) with options for smart consumption considering energy cost in diff time of the day/night.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.