Closed nicogon closed 4 years ago
by the way. GREAT job guys!
The reason that the flag is not enforced for all devices is, that a lot of controllers do not need it and actually do not work if it is set. Therefore, having it set by default for all devices would break backwards compatibility, since this library did not support bulbs in the beginning.
From the original Python script I gathered, that type 0x25
was some kind of bulb, so I put in a bit of code, which automatically sets the flag, if queryState
encounters a device of this type. Now what you're saying is, that there are apparently bulbs with other types out there. I can't verify this unfortunately, but I could add this to the list of types, which automatically have the flag set to true.
Can you post the output of magic-home query_nice <bulb_ip>
, i.e. the output of queryState
here, so I can see for myself? Afterwards, I would be happy to add this type to the list.
{ "type": 68, "on": true, "mode": "color", "speed": 50, "color": { "red": 0, "green": 0, "blue": 0 }, "warm_white": 255, "cold_white": 0 }
Looks good! Version 2.3.1 now sets the parameter automatically in queryState
.
I've discovered that my magic bulb needs apply_masks in true (type 0x44). Why this flag is not enforced for all devices?