HaDevice - List can we change the defined levels

  • 247 Views
  • Last Post 07 July 2014
apj101 posted this 05 July 2014

I'm playing with the example code you gave for the Foscam and virtualcontroller
I want to create a controller that will look after my russound zones
Each device will need five settings, Off, Source 1, Source 2, Source 3, and Source 4

If i use the code for the virtual switch will i be forced to use the 100 levels of the dimmerswitch device
can i change the number of levels? to just 5?

Do i play with the
List as part of the HaDevice class?


Thanks

Ryan-Scott posted this 07 July 2014

I'm playing with the example code you gave for the Foscam and virtualcontroller
I want to create a controller that will look after my russound zones
Each device will need five settings, Off, Source 1, Source 2, Source 3, and Source 4

If i use the code for the virtual switch will i be forced to use the 100 levels of the dimmerswitch device
can i change the number of levels? to just 5?

Do i play with the
List as part of the HaDevice class?


Thanks


There's not really a way now to limit it to just 5 settings... but you could perhaps split that dimmer slider into 5 zones with 20 values each. So you'd have 0-19 as "off" and 20-39 as source 1, etc. You could use the dimmer slider to set it where you want, though you'd have to learn the position of each set of numbers. To make it easier to control, you could create a scene for each setting; so "scene 1" could set it to 0, scene 2 could set the value to 20 and so forth.

You could probably make it act like a multi-channel device as well, but the control would be different. In this case, you'd have 1 device for each of your settings (so 5 devices total inside of InControl, each one independently controlled). You'd need to make sure when you turn on the device for a given source that the others all switch to off so they show properly inside the UI. I would need to create some documentation if you wanted to go this way.

Close