Evaluating MimoLite Device

Posted on
Sat Jun 13, 2020 10:39 am
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Evaluating MimoLite Device

So I'm trying to evaluate the value of one of the MimoLite instances...

I've tried
Code: Select all
if (indigo.devices[588052015].onState == "off"):
but that didn't work. and
Code: Select all
if (indigo.devices[588052015].onState == off):
spits out a
Code: Select all
global name 'off' is not defined
error message.

Just wondering if there is a easy way to evaluate this device via Python....

Posted on
Sat Jun 13, 2020 11:14 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Evaluating MimoLite Device

The onState attribute is a boolean type so by itself it evaluates to True or False. Either of these will work if you are testing for the device state being OFF:

Code: Select all
if indigo.devices[588052015].onState == False:


Code: Select all
if not indigo.devices[588052015].onState:

Image

Posted on
Sat Jun 13, 2020 12:18 pm
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Re: Evaluating MimoLite Device

Hey Matt

Thanks.

I appreciate your taking the time to help me with this.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 16 guests