Hello,
I recently got my Flic 2 smart buttons with the Flic Hub and wanted to set them up via an HTTP request with a long-lived access token.
The URL I am trying to reach:
http://MYIPADRESS:8123/api/services/light/turn_on
My request body:
{”entity_id”:”light.aurora”}
However, when putting in an entity ID as the body, I get an error (error 400: bad request).
When I leave the body empty, Home Assistant turns on all the lights in my home (and in the log I get the message:
Not passing an entity ID to a service to target all entities is deprecated
That should mean the request is coming through to Home Assistant and I am doing something wrong with the request body. Sending the same request via CURL from the command line on my computer works and turns on the light I want to turn on.
Does anyone have an idea what that could be and/or encountered the same problem? I would really appreciate the help!