Devices.xml ValueType

Posted on
Thu Oct 01, 2015 11:50 am
DaveL17 offline
User avatar
Posts: 6786
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Devices.xml ValueType

Hi guys - a quick question.

According to the documentation, the allowable values for a state's <ValueType> are: Boolean, Number, List, String, and Separator. Ive noticed that Integer and Float are also allowed (though somewhat undocumented as at least 'Integer' is used on the Device Class page), but both seem to be treated by Indigo the same as a Number type. When I try a <ValueType> of 'HamSandwich', Indigo is unhappy, so it seems that Integer and Float types are either being trapped or treated as one would expect.

Bottom line: is there any advantage to using Float and Integer, or is Number sufficient?

Thanks,
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Oct 01, 2015 1:05 pm
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: Devices.xml ValueType

Those are both currently mapped, if I remember correctly, to Number internally. In theory that could change some day and we might have more specific type checking. So although it isn't documented and currently it just maps to Number, it wouldn't hurt to use the more specific type if that is what you really need.

Image

Posted on
Thu Oct 01, 2015 2:33 pm
DaveL17 offline
User avatar
Posts: 6786
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Devices.xml ValueType

Thanks Matt. That sounds like a good plan to me. That's what I'll do.


Sent from my iPhone using Tapatalk

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests