REST API: Empty Response

Hi there,

I am currently switching a relay attached to an ESP8266 via a REST Post Call:

curl --location --request POST 'http://192.168.1.71:8123/api/services/switch/turn_on' \

--header 'Authorization: Bearer xxxlongTokenxxx' \

--header 'Content-Type: text/plain' \

--data-raw '{"entity_id" : "switch.garage_links_test"}'

The POST command works flawlessly, however the response is always empty. So I actually have no idea if the ESP actually changed, if its power is off or if there are any other problems with it.

Does anybode know, why? According to the API doc

there should be a list of all state changes…

Thanks,
Wolf

Has nobody else ever experienced this behaviour (an empty response body)? Or is this actually expected behaviour when switching a single switch?

Hi! I’m completely new to HA and I’m having the same issue. Have you managed to solve it by any chance?

Hi Jakub,

I was not able to fix this. By now I am using a widget from the Home Assistant App. I also do not really get any significant feedback but it anyway works most of the time…

Best,
Wolf