How to toggle brightness level?

Posted on
Thu Aug 28, 2014 3:57 am
colinpartridge offline
Posts: 377
Joined: Jan 13, 2014
Location: London, UK

How to toggle brightness level?

Because things are never as straight forward as you first think I am trying to use a minimote to control a Fibaro rgbw controller. The original plan was easy..create a trigger using a button press from the minimote to toggle the on/off state of the relevant channel of the rgbw controller, however, as I found out sometime ago the rgbw channels do not respond to on/off commands reliably, only responding to changes in level ( brightness). So I'm looking for a way to toggle between a brightness level of 0 and 100% so that I can use just one button to toggle the lights connected to the RGBW controller channel on and off.
Hope this makes sense

Colin

Posted on
Thu Aug 28, 2014 6:16 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: How to toggle brightness level?

colinpartridge wrote:
.... So I'm looking for a way to toggle between a brightness level of 0 and 100% so that I can use just one button to toggle the lights connected to the RGBW controller channel on and off. ...

This python script might work for you:
Code: Select all
if indigo.devices[<YOUR DEVICE ID>].brightness < 100:
   indigo.dimmer.setBrightness(<YOUR DEVICE ID>, value=100)
else:
   indigo.dimmer.setBrightness(<YOUR DEVICE ID>, value=0)
Hope this helps :)

Posted on
Thu Aug 28, 2014 2:36 pm
colinpartridge offline
Posts: 377
Joined: Jan 13, 2014
Location: London, UK

Re: How to toggle brightness level? (Solved)

Thanks very much Autolog, that did the trick.
Cheers

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest