Becomes more than

Posted on
Fri May 24, 2019 2:55 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Becomes more than

Guys,

Can you remind me how/why my device states in triggers are only allowing Equal/Not Equal, rather than Greater/Less than?

Initially the device state was stored as str(value), but i've changed it to int(value) and checked in the scripting shell that indigo.devices[123].states['power'] is now an int.

What else do I need to fix?

PEter

Posted on
Fri May 24, 2019 3:07 pm
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Becomes more than

What is the actual state definition in Devices.xml?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri May 24, 2019 3:18 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Becomes more than

Erm, textfield I think?


Sent from my iPad using Tapatalk Pro

Posted on
Fri May 24, 2019 3:22 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Becomes more than

Nope, you’re spot on.

It’s string and needs to be number.

I knew I’d had this <strike>argument</strike> <strike>discussion</strike> problem before, but couldn’t remember why!


Sent from my iPad using Tapatalk Pro

Posted on
Sat May 25, 2019 9:23 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Becomes more than

Right now types aren't enforced as much as "hinted", particularly WRT device states. This is something we will make even more pervasive as time goes by so that the UI can be more reactive.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest