Trigger a specific action on the ESP32 using the url command via the web browser. How?

Can I trigger a specific action on the ESP32 using a URL command via the web browser like: http://192.168.178.151/Relay_ON (or similar)?
This can be done using an IDE code. I can define that. But how does this work with an ESP32 with a YAML code (ESPhome)?
For example:

  1. That the relay is set to ON.
  2. That the relay is set to OFF.

Do I understand correctly - wanna make HTTP requests from ESPHome device ?
Check this:

As I understand it, it’s the other way around. In which case you want to check out the Web Server component and its REST API.

1 Like