Can I toggle a input_boolean helper from a device?

I have two devices. One is a switch on an ESP8266-01, and all it does is monitor a switch. When the switch closes, I want to toggle an input_boolean helper entity defined in Home Assistant.

The second device will have an automation to listen for the helper entity state to change. When it triggers, a script on device 2 will run.

So, is there a way for me to toggle the helper entity from device 1?

Ultimately, I want the switch closing on device 1 to cause device 2 to run a script.

Any help would be appreciated.

As long as device 1 is visible in HA, it sound like you just need an automation… how is the state of the switch represented in HA?

I knew it would be easy… Thanks

I had not configured the device to Home Assistant yet, but the switch is easily visible now: