I’m using a Mote pHAT on a Pi0 to mirror some Hue-compatible bulbs in a room. My script polls the API on my Hue Hub to find out whether the bulbs are on and if so get their colour (then do some jiggery pokery with it) and show it on the Mote sticks.
If none of the bulbs are on, the script checks to see if they’ve only recently been turned off, via a boolean called wasOn - it goes like this (NB: motephat is imported as mote):
if wasOn == True: mote.clear() mote.show() wasOn = False
That worked perfectly on the iMac-connected Mote, but with the Mote pHAT I get some odd behaviour: the strips all turn off, but then the first pixel on channel 2 lights back up, pure white. I haven’t found any documented explanation for this, and I’ve tried a bunch of different things to fix it.
Can anyone point me in the right direction, so that all of the pixels will actually turn off? I’ve no doubt it’s going to be something simple and/or stupid that I’ve done or not done, but I’m past the point of being able to figure it out myself without tearing out chunks of hair!
Edited: to fix the indents, which were bugging me. Also, I’ve now tried literally everything I can think of. I created a new script that simply turns all LEDs on all four strips on, sleeps for ten seconds, then turns all of them off and sleeps for ten seconds - again, channel 2 pixel 1 goes off along with the others very briefly, then turns back on, bright white, for the rest of the ten seconds. I’m utterly baffled.