namacha/python-magichue

hangs on setting light.brightness

Closed this issue · 3 comments

I have 2 v4 magichome bulbs, and 1 v6 magichome bulb. They all used to hang on light.brightness = [value], but the last update fixed the problem for the v4 bulbs. The bulb's brightness changes, but my code gets blocked.

Is it hangs only when you try to change brightness?
It would be a big help if you could paste a result of light._get_status_code()

Anyway, these code will solve a problem.

light = magichue.Light(addr)
light.confirm_receive_on_send = False  #  Set this value to False if light hangs.

I only use light.on, light.off and light.brightness. The problem only occurred when setting the brightness, not when turning it on or off. When i use light._get_status_code() i get on error, but i can upload the result of light._get_status_data() if that's what you meant.

Your suggestion did solve my problem, thanks!

Oh I'm sorry,light._get_status_code() was incorrect. light._get_status_data() is the correct code.

Anyway I am happy to hear that you could solve a problem.