If quickly polling the brightness immediately after setting it the H Series fan with light seems to frequently return ON/OFF rather than an integer for the brightness level.
This can be demonstrated from a repl by running:
f = discover()[0]
# with light currently on.
# setting brightness = 0 will turn the light off
f.brightness = 0; f.brightness
# or
# with light currently off.
# setting brightness = 1 will turn the light on
f.brightness = 1; f.brightness
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/tom/dev/SenseMe/senseme/senseme.py", line 140, in brightness
return int(self._query("<%s;LIGHT;LEVEL;GET;ACTUAL>" % self.name))
ValueError: invalid literal for int() with base 10: 'ON'
If quickly polling the brightness immediately after setting it the H Series fan with light seems to frequently return ON/OFF rather than an integer for the brightness level.
This can be demonstrated from a repl by running: