Trigger Automation from custom:button-card

Hi,

I have a custom:button-card that I want to trigger an automation on tap:

entity: binary_sensor.input_1
label: Stromkreis 1
name: Steckdosen
show_label: true
state:
  - color: gold
    icon: 'mdi:power-socket-eu'
    value: 'on'
  - icon: 'mdi:power-socket-eu'
    value: 'off'
styles:
  label:
    - font-size: 13px
tap_action:
  action: call-service
  service: automation.trigger
  service_data:
    entity_id: automation.circuit_2_toggle
type: 'custom:button-card'

If I use the developer tools to call the service automation.trigger with the entity_id set to automation.circuit_2_toggle the automation get triggerd, If I click the button nothing happens.

I did a quick check an replaced automation.trigger with persistent_notification.create and the service_data set to message: Test.
If I do that, the notification gets sent on button tap.

entity: binary_sensor.input_1
label: Stromkreis 1
name: Steckdosen
show_label: true
state:
  - color: gold
    icon: 'mdi:power-socket-eu'
    value: 'on'
  - icon: 'mdi:power-socket-eu'
    value: 'off'
styles:
  label:
    - font-size: 13px
tap_action:
  action: call-service
  service: persistent_notification.create
  service_data:
    message: Test
type: 'custom:button-card'

Any idea whats wrong with my config for the automation trigger szenario?

What happens if you use a script instead of the automation?

tap_action:
  action: call-service
  service: script.circuit_2_toggle

I’m not saying automation trigger shouldn’t work as you have written it, just wondering…

If I try calling the automation directly like so:

tap_action:
  action: call-service
  service: automation.circuit_1_toggle

I get a service not found error.

Did you change the automation to a script and restart?