The main goal is udpate HA API with callbacks to device, witch create a new state with POST to /api/states/<entity_id>.
add with JSON new attrs (example rest switch):
1. callback_url_on
1.1 callback_headers_on
1.2 callback_body_on
and of course
2. callback_url_off
2.1 callback_headers_off
2.2 callback_body_off
When device send to HA REST API new state device with callback urls and antoher data to manage switch - HA can immidetly control that, no need restful_command and another.
For developers is great options to modify and create API2API communications without a thousands integrations.
It can be helpful with light devices, for example callback “set brightness level” URL and data to device back and control that.
Advantages:
- More useful HA REST API – one way logic over. With callbacks (reverse web-hook) – is the way to create native devices to HA without writing any integration’s.
- No needed to create a lot of restful_command to control for example 25 groups of light.
- Fast and native as possible. No MQTT or another way co communicate with HA.