As far as I know, you cant do operations between different esphome devices directly. Either register a service to be called from home assistant inside the light node and execute this service on the esp01 or you have to use an automation in home assistant.
Well AFAIK you can set up the web server on the esp to be controlled, which creates a REST interface, then use the http request component on the controlling esp.
I’m really new to HA/ESPHome. Can you point me to an example of registering a service in a node? I looked through the docs and found some info, but I don’t think I’m searching for the correct terms.
I looked at doing that but the web server service uses a lot of memory. I had low memory issues on the ESP-01 and OTA updating when I first started using ESPHome. Removing the web server function resolved that.
I’m sure that I could do that on the NodeMCU’s, but I’d like to have the same solution for every device.
Heres an example how to do it, i use it to have service calls instead of switches for my amplifier, which gets controlled through IR, which behave strangely.
after the then: line there goes your actions that you want to execute. Theres even a possibility to make use of service data like a disired color for an rgb light, a fade out time and so on.