Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95365

Trigger Automation from custom:button-card

$
0
0

@Bouni wrote:

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?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95365

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>