dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: October 31 2006 at 10:12 | IP Logged
|
|
|
Jared,
It can be done with some code. I plan on adding "Toggle Buttons" in a near future release which will do what you want.
In the meantime, the way to do this with code is follows:
I'll assume that you're using Insteon and the Insteon Device ID we're controlling is "YOURID". Furthermore, the Control Center tab that the button is on is "YOURTABID" and the ID of the button is "YOURCCID".
With the above assumptions, you'll want to create a "Text Button" with an "Action Type" of "Raw Formula". You would then put the following formula in the "ID" field:
Code:
if(ph_getinsteonstat("YOURID") = 2,ph_insteon("YOURID",ioff,0) + ph_setccobjbcolor("YOURTABID","YOURCCID",16711680),ph_insteo n("YOURID",ion,255) + ph_setccobjbcolor("YOURTABID","YOURCCID",255)) |
|
|
This should give the desired results.
HTH,
Dave.
|