Closed lumaxis closed 4 years ago
Is this really necessary? The plugin currently expects you to enter a designed url for turn on and off? You could just manually enter "on":1
for the onUrl and "on":0
for the offUrl?
Got no problem with merging this, just though this wasn't necessary in the first place, which is basically the reason why the feature is currently not there.
You could just manually enter
"on":1
for the onUrl and"on":0
for the offUrl?
That's definitely what I'm already doing today. I think I got confused by the weird behavior of the API that happens when the brightness
value is not a string and the automatic power update that happens when changing the brightness of a lamp.
Similar to https://github.com/Supereg/homebridge-http-lightbulb/pull/4#issuecomment-606642558, this turns out to not actually be necessary.
Also triggered by my usage of the Elgato Key Light, I wanted to add some more flexibility around using e.g. brightness and color temp. replacement values in the
onUrl
andoffUrl
bodies and allow to use the current power state as a replacement when setting any of these other config values.This is necessary because the Key Light always requires all the values to be sent in the
PUT
request's body, otherwise they are reset: