testing:
{{ expand('group.all_lights')|
map(attribute='entity_id')| list | join(', ')}}
creates a beautiful list of all individual lights. Wouldn’t it be magic if we could use this as part of a trigger template, instead of having to list all lights in the automation. It is in fact long longed for and currently missing functionality…
I’ve tested a few simple automation configurations, but they error out in the config check. Surprisingly not on the template, but, eg on the 'to:'
field not being allowed.
Is still not possible, or am I doing something wrong
- alias: 'Notify Hub Offline'
id: 'Notify Hub Offline'
trigger:
platform: template
value_template: >
{{ expand('group.hubs_binary_pinged')|map(attribute='entity_id')| list | join(', ')}}
# platform: state
# entity_id:
# - binary_sensor.asus_router
# - binary_sensor.ikea_tradfri
# - binary_sensor.philips_hue
# - binary_sensor.iungo
# - binary_sensor.solaredge
# - binary_sensor.timecapsule
# - binary_sensor.synology
to: 'off'
for:
seconds: 30
condition: []
action:
- service: notify.notify #HA app notification
data_template:
title: 'Hassio Main system message: Hub offline!'