Automation: works on dashboard but not at swtich


I am just now getting into the meat of HA. I have all my devices installed and linked up with Alexa and some leftover stuff on smart things. Everything seems controllable at the dashboard and working like I think it should be.

Here is what I am running into. I have some automation set up and if I trigger them via the dashboard they work great. If I trigger them on the device, nothing happens.

At the simplest, one switch turns on another switch just fine if I trigger it at the dashboard but if I go hit the physical switch, nothing happens.

My installation is OS 9.4, Core 2003.1.4 on a ODROID-N2+ 2G
My apologies. I did search and really just didn’t know how to narrow the search but I didn’t run across anything that seemed releveltn. The “Your topic is similar to…” didn’t reveal any insights either.

I think there is a bad device that I am working with. I got some help from Tinkerer on Discord and ended up with this code that is verified to work with a bunch of test pairs of devices. Once I get to the switch in question, not only does the automation not work the switch shifts to Status: Dead in the z-wave config and I have to go reset the switch. I then also see a Repair notification pop up saying the automation uses an unknown service. Seems like HA can get the status from that switch and screws up the service: homeassistant.turn_{{ trigger.to_state.state }} line. Last time I went to reset that switch it was making a repeating blinking noise like a relay repeatedly throwing. Time to replace it.

Not sure why you are reading this but congratulations you made it to the end of the drama. BTW here is the yaml that works well to mirror the state on 2 devices.

alias: closet bonded to Various Test Lights - state
description: ""
  - entity_id:
      - light.bedroom_in_wall_paddle_dimmer_qfsw_500s
      - light.basement_stairwell
    platform: state
    to: null
condition: []
  - entity_id:
      - light.bedroom_in_wall_paddle_dimmer_qfsw_500s
      - light.basement_stairwell
    service: homeassistant.turn_{{ trigger.to_state.state }}
mode: single