Set value through API call

Hello,

I want to display a simple YES/NO value on the dashboard and I want to set this value through a REST API call to HA.
I’ve figured out the API stuff but I can’t seem to find the exact objects I need to create in HA.
Can anyone help me ? A small config snippet would be helpful

Thnx

You don’t need to create anything in HA: the API call will do that for you. If it’s a binary yes/no, use the binary_sensor domain.

Once that’s available, add it to your dashboard.