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

Html5 Notification with service template and action

$
0
0

@Dreamoffice wrote:

Hi
i have trouble in getting this automation to work
it is just a test setup.

- alias: Garagentor Jogi test
  trigger:
  - entity_id: light.magichome_1
    platform: state
    to: 'on'
  condition:
  action:
    - service_template: >
        {% if (is_state('device_tracker.mi9tpro_miphone', 'home')) and (is_state('device_tracker.mi9tpro_miphone_2', 'home'))  %}
          notify.push_html5
        {% elif is_state('device_tracker.mi9tpro_miphone', 'home') %}
          notify.push_html5
        {% elif is_state('device_tracker.mi9tpro_miphone_2', 'home') %}
          notify.push_html5
        {% endif %}
      data:
        message: 'test message'
        title: 'test message title'
        actions:
        - action: garage_jogi_schliessen
          title: Garage schliessen

if i remove the action part at the end the notification is working. but how can i implement the action in this setup. any idea?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 96123

Trending Articles



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