Adding state to existing devices

Posted on
Thu Dec 08, 2016 2:15 pm
FlyingDiver offline
User avatar
Posts: 7227
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Adding state to existing devices

One problem I've run into is that if I make a change to a device that adds a state, I get errors using updateStateOnServer() to set a value for that state, since it doesn't exist. Only editing the device in the Indigo client seems to create the new state properly.

I can add new device properties no problem, but not states.

Am I missing something obvious?

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

Posted on
Thu Dec 08, 2016 2:20 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Adding state to existing devices

Try the following command on your device startup to force the states to populate or, in the case that I most use it for, to remove themselves if you have taken them out of the devices.xml:

Code: Select all
dev.stateListOrDisplayStateIdChanged()

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Dec 08, 2016 2:34 pm
FlyingDiver offline
User avatar
Posts: 7227
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Adding state to existing devices

Figured it would be something obvious that I missed.

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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests