I can not get the temperature by code:
tem=evt.currentValue(“temperature”)
Help me, thanks
If you’ve subscribed to the temperature events, then the temperature is contained within evt.value
evt.name returns the attribute name and evt.displayName returns the device name.
I want to get Temperature value, You can see photos I’ve just inserted.
Help me.
As @Mike_Maxwellmentioned All you need is evt.value
this only happens IF there is an event and you subscribe to it.
If you are just trying to read the Temperature from another device, that is another problem than the responses here.
I used the Smartthings motion & Temperature multisensor to trigger when a freezing temperature was reported
I found that this sensor issued a Temperature event once every hour. That worked for me to just use the event.