The Green Shed

Home Assistant API Call for Setting Dimmable Lamp Brightness

I had to play around with the Home Assistant API to figure out how to set the brighness of a dimmable lamp. This is what ended up working.

My lamp was setup with brightness as a Number.

curl -H "Authorization: Bearer your_token_goes_here" -H "Content-Type: application/json" -d '{"entity_id": "number.my_lamp", "value": 100}' http://homeassistant.local:8123/api/services/number/set_value