i am trying to set the state of an entity through the API but the door always shows as "open" (as in the icon is always the open icon and it is always highlighted).
im changing it by sending a post request to http://192.168.3.10:8123/api/states/binary_sensor.front_door_test with the json body:
{
"state": "closed",
"attributes": {
"device_class": "door"
}
}