Hello everybody,
I use all kinds of notification services in a various number of automations. To keep an overview, I created a script that manages the different notification types. This way I could track where the script is used.
I was quite disillusioned, when I discovered that no related automations were displayed in the ‘more info’ dialogue. I then checked other scripts with the same result. Only two scripts show in which automations they are used.
Before I raise an issue on Github, I would like to hear other opinions on whether it might be my scripts themselves or I’m making a mistake in thinking.
Script where related automations are displayed:
alias: "[Alarm] Blinklicht"
variables:
l: >-
{{ states.light
|rejectattr('attributes.entity_id', 'defined')
|rejectattr('attributes.hue_type', 'defined')
|rejectattr('entity_id', 'in', ['light.ankleide',
'light.hue_smart_plug_0b96e1'])
|map(attribute='entity_id') |list }}
sequence:
- service: light.turn_on
target:
entity_id: "{{ l }}"
data:
brightness_pct: 100
rgb_color:
- 255
- 0
- 0
- delay:
seconds: 2
- service: light.turn_off
target:
entity_id: "{{ l }}"
- service: script.turn_on
target:
entity_id: script.alarm_loop
Without:
alias: notify_services
description: |-
zentrale Verwaltung aller 'notify' service calls
packages/skripte/notify_service.yaml
variables:
service: dötchen
service_source: >-
{{- service |replace('alexa', 'alexa_media') |replace('last',
'alexa_media_last_called') |replace('dötchen', 'alexa_media_echo_dotchen')
|replace('show', 'alexa_media_echo_show') |replace('google',
'google_nest_mini') |replace('persist', 'persistent_notification')
|replace('push', 'push_benachrichtigungen') |replace('sprache',
'sprach_benachrichtigungen') -}}
target: >-
{{ 'media_player.echo_' ~ service if service in ['dotchen', 'show'] else
'group.echos' }}
title: ""
message: notify
type: tts
sequence:
- if:
- "{{ 'alexa' in service_source }}"
then:
- service: notify.{{ service_source }}
data:
title: "{{ title }}"
message: "{{ message }}"
target: "{{ target }}"
data:
type: "{{ type }}"
else:
- service: notify.{{ service_source }}
data:
title: "{{ title }}"
message: "{{ message }}"
I am happy to receive any kind reply.