Assigning the tap action of one entity to another. (Glance card)

I’m trying to get the functionality of automation entity without having a dedicated button for it, in this example using the Glance card.

I wanted to remove the entity / button for automation to preserve some horizontal space and integrate the functionality into, for example, hold_action for one of the other entities. Is this possible?

By default all these entities have the hold_action and tap_action set to “more-info”, so I want to make the card more compact by differentiating the action taken with these interactions.

How do I assign the tap action of one entity to another?
For example, to achieve sensor.smart_plug_mini_voltage info when tapped and automation.turn_on_at_8am toggle when held down.

My current card configuration:

type: glance
entities:
  - entity: sensor.smart_plug_mini_voltage
  - entity: sensor.smart_plug_mini_current
  - entity: sensor.smart_plug_mini_power
  - entity: automation.turn_on_at_8am
    tap_action:  
      action: toggle
  - entity: switch.smart_plug_mini
    tap_action:
      action: toggle

I want to switch it up to something like this to make it more compact and not loose any functionality.
(just an example code, currently not working):

type: glance
entities:
  - entity: sensor.smart_plug_mini_voltage
    hold_action:
      action: perform-action
      perform_action: automation.turn_on_at_8am
        action: toggle
  - entity: sensor.smart_plug_mini_current
  - entity: sensor.smart_plug_mini_power
  - entity: switch.smart_plug_mini
    tap_action:
      action: toggle

That’s not an actual action… if you want to toggle the automation entity between enabled and disabled, you would use automation.toggle.

type: glance
entities:
  - entity: sensor.smart_plug_mini_voltage
    hold_action:
      action: perform-action
      perform_action: automation.toggle
      target:
        entity_id: automation.turn_on_at_8am
  - entity: sensor.smart_plug_mini_current
  - entity: sensor.smart_plug_mini_power
  - entity: switch.smart_plug_mini
    tap_action:
      action: toggle

Thanks for your response!
This works, sort of.

Toggling is useful, but unfortunately automation.toggle can’t show me a current state of the automation, like I would be able see in the “more-info” styled tab.

And automations are, as far as I can tell: turn_on, turn_off, toggle, trigger, reload. So nothing that can show me its state, even in another menu.

So maybe a different approach to visualize the state of an automation.
Can I change the color of another entity based on the enabled / disabled state of the automation?

I think you’ll likely need to use something outside of core like Auto-Entities card or Browser Mod.