I want to get the temperature from the motion sensor?


(Võ Thanh Minh) #1

I can not get the temperature by code:

Help me, thanks

(Mike Maxwell) #2

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.

(Võ Thanh Minh) #3

I want to get Temperature value, You can see photos I’ve just inserted.
Help me.

(Tim Slagle) #4

As @Mike_Maxwellmentioned All you need is evt.value

(George) #5

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.