From using LIFIX Mini, i could understand that when we send the brightness variable with the parameter 0 the light and power variable turns off and the stored value is equal to the previous value before the 0 parameter was send.
If we give an input big enough lets say 5555555555 (and i know that the brightness variable is limited between 0 and 1) the behavior is strange in my opinion. What happens is that the lamp will turn off, the power variable will stay “on” and the brightness variable will store the value 0.
My questions is, if this behavior is in line with correct behavior of the device?(when brightness=0 then the power should be “off”) despite the malformed parameter, or the malformed parameter affects the device in some weird way and this was not the intended behavior for the device.
Are you using a LAN SDK or the HTTP API?
HTTP API. I also did an Excel with all the different variants and correspondent outputs, but unfortunately i am a new user in this forum and i cannot upload the file.
You can always email me the file at firstname.lastname@example.org.
So, first off, sending values outside the defined ranges results in undefined behaviour. So yes the behaviour will be strange. In the future we will probably outright reject requests such as these.
power are different values in the bulb.
brightness relates to the colour the bulb is displaying and
power represents its on off state. When the
brightness is 0 the bulb is essentially displaying the same thing as if the
power was off, but the bulb treats them as two separate states.
This allows you to change the
brightness of the device while the power remains off so that next time the bulb is powered on by any means (including another app) it will come on at the previously set
Does that make sense?
yes, it makes complete sense to me.
I just though that it was wrong/strange/incorrect to have a combination of values where the brightness was 0 and the power was on.