It is common need to send data read from sensor or states of device to some remote location, like web site or database. ESPHome allows doing that, and it works pretty well, once you find out how to do it.
For sending data, you can use HTTP GET or POST method. As data usually has some complexity, I prefer using POST and send all info as JSON structure. That is universal way.
First thing you have to use is to include http_request component into code:
http_request: id: http_request_data useragent: esphome/device timeout: 10s
You have to set id for component so you can access it later. […]
[ ... види цео чланак ... ]