Can I configure an entity filter item to do a specific function?

In my Entity Filter card I have it set to show an Amp reading if the plug is using more than .01 Amps. However when this Amp reading shows up I want to be able to tap it to turn off the plug. Is it possible to somehow define the entry so that it’s an on/off toggle?

Below is the relevant code. The sensor.lamp_plug_electric_consumption_a is what I want to act as an on off toggle.

Thanks

type: entity-filter
entities:
  - light.play_room
  - sensor.lamp_plug_electric_consumption_a
state_filter:
  - 'on'
  - operator: '>'
    value: .01
card:
  type: entities
  title: Active Lights

I donot know that card, but this solution does the same and allows to add a tap_action
thomasloven/lovelace-auto-entities: :small_blue_diamond:Automatically populate the entities-list of lovelace cards (github.com)

Thank you for the tip, I was able to get it working after switching to the auto-entities card. For anyone curious of the solution…

cards:
  - type: custom:auto-entities
    show_empty: false
    card:
      type: entities
    entities:
    filter:
      include:
        - entity_id: sensor.kid_room_plug_electric_consumption_a
          state: '> 0.01'
          options:
            tap_action:
              action: call-service
              service: switch.turn_off
              service_data:
                entity_id: switch.kid_room_plug
      exclude:
1 Like