I am looking at creating a custom alert which does all of my sensors, eg water, and motion. I have come up with the following, but when a sensor is triggered it is showing only the following:
[[[ return Motion - ${entity.attributes.friendly_name}
; ]]] and not the actual name, apologies i am only really new to this, so figuring it all out.
The code is below:
type: custom:auto-entities
card:
type: entities
title: Active Sensors
filter:
include:
- entity_id: >-
/binary_sensor\.(uvc_g4_doorbell_camera_motion|uvc_g4_pro_camera_driveway_motion|uvc_g4_pro_camera_side_motion|unifi_g4_camera_motion|garage_hue_motion_sensor_motion|dining_room_g3_dome_camera_motion)/
state: 'on'
options:
name: |
[[[ return `Motion - ${entity.attributes.friendly_name}`; ]]]
icon: mdi:motion-sensor
- entity_id: >-
/binary_sensor\.(aquarium_water_sensor_moisture|water_sensor_aquarium_floor_moisture)/
state: 'on'
options:
name: |
[[[ return `Water Leak - ${entity.attributes.friendly_name}`; ]]]
icon: mdi:water-alert
If there is a nicer way to present too would be appreciated. Thanks in advance!