Hi, I’m trying to get my then expensive Luke Roberts lamp into HA, the only way is via the Rest Api, otherwise communication only works via BLE via app.
A Rest Switch with on off already works. Now I am facing the problem with the brightness, if I set the command in the payload with payload: '{"brightness": "80"}' in the Rest command directly, the call works in the developer settings. However, since the goal is to ultimately create a light template, I need a functioning payload where I can specify the value separately.
I have tried different things payload: '{"brightness": {{ brightness }}}' doesn’t work after I read the tip.
thank you @koying for your help, unfortunately I am now at a point where I do not know if it works or not, I have entered a value of 10 in the developer settings as shown in the picture, but unfortunately nothing happens. In the logs I could not see anything wrong with the payload.Hm, the lamp is documented via Swagger API, there you have to specify as payload as an example ````{ “brightness”: 75, “relative”: false } ``` as an addition, why I do not know.
in the sparse API PDF I only find the following:
Supported payloads
On/Off
{“power”: “OFF”}
{“power”: “ON”}
Brightness (0…100 %)
{“brightness”: 42}
Color Temperature (2700…4000 K)
{“kelvin”: 3700}
Select Scene (0…31)
thanks @koying that was the trick. sorry for the late response but my son had an operation.
Now I have created an input helper with which the light dimming works perfectly, unfortunately it does not seem to work in the UI. There the lamp in the UI has the really full brightness at about 50 percent. Below 50 percent and above 50 percent the light is very dimmed. Ok I thought this was due to the 255 value that Home Assistant gives out, I have installed the following but it still doesn’t seem to work.What can i do now? Thanks alot