API testing


I’m just playing around with the API and looking at this:

Specifically the bit to turn a light on.

I’m using Postman to test things out.

My body just looks like this:


When I send the request, the switch in HomeAssistant toggles to the on position but the light doesn’t actually do anything. So, everything must be about right or it wouldn’t talk to HA at all (I’m guessing).

If I look in the logs, the entries where I send from Postman look exactly the same as the ones where I use the switch in HA. In Postman, I get a “200” status returned.

I’m relatively new to this so I’m probably missing something. Any ideas would be gratefully received.