BazaJayGee66 / pycololight

A Python3 wrapper for interacting with LifeSmart ColoLight
MIT License
6 stars 0 forks source link

is there any way to toggle cololights ? #3

Closed AquaCobell closed 1 year ago

AquaCobell commented 2 years ago

something like light.toggle() and when they're on they go off and vice versa

BazaJayGee66 commented 2 years ago

No way to toggle, as brightness value must be passed when turning on.

You could use a simple if statement to toggle however.

This will turn the light off if it's on, otherwise turn on at 100 brightness:

light.on = 0 if light.on else 100