Alexa not running routines

I have an “Alexa wifi outlet” that I have connected to a 3d printer light.
I wanted to get this accessible through HA. So what I’ve done is create a binary switch (as a device class of door) and a toggle in the web interface.

After discovering new devices the Alexa app sees the binary switch. When I click the toggle in HA I can see it go from open to close, etc. Great!

I created a routine that whenever that binary sensor goes open to turn on the wifi switch, and likewise, when it closes to turn it off.

Problem is: The routines never run!

I don’t even know how to begin to troubleshoot a problem like this.

Here’s my config for the binary sensor:

binary_sensor:
  - platform: template
    sensors:
      3d_printer_2:
          friendly_name: "3D Printer 2 (Binary Switch)"
          device_class: door
          value_template: "{{ is_state('input_boolean.3d_printer_2', 'on') }}"

If I click “play the routines” they work.
But otherwise, there is no activity and they are not actuated.

Here is a routine (because the forum did not allow multiple media items in my post)