Got some debug information back from on of my users. Apparently, for a few lights there was a Brightness of -1, which is very strange.
This of course causes an error when deserializing the light state. What is the best way to deal with this? Can we check if the Brightness level is less than 0 and make it 0, or if more than 255 make it 255?
Not sure what to do with this. It's just the default Json.net converter that converts the value to a byte property. The value of -1 should not be possible.
Got some debug information back from on of my users. Apparently, for a few lights there was a Brightness of -1, which is very strange.
This of course causes an error when deserializing the light state. What is the best way to deal with this? Can we check if the Brightness level is less than 0 and make it 0, or if more than 255 make it 255?
I'll check how these values ended up!