Skip to main content
16-Pearl
March 25, 2020
Solved

How to check if a Thing is enabled or disabled

  • March 25, 2020
  • 1 reply
  • 2892 views

I need users to be able to enable/disable Things with a toggle button.  Is there a way to check if a Thing is enabled/disabled?

Best answer by Willie

Never mind.  Found it.

 

//input: thingname

// enabled: BOOLEAN
var enabled = Things[thingname].IsEnabled();

1 reply

Willie16-PearlAuthorAnswer
16-Pearl
March 25, 2020

Never mind.  Found it.

 

//input: thingname

// enabled: BOOLEAN
var enabled = Things[thingname].IsEnabled();