I have the following automation to alert on battery going low from my binary sensors:
- alias: Announce Sensor Battery Low
hide_entity: false
initial_state: 'on'
trigger:
- platform: state
entity_id:
- binary_sensor.north_east_PIR_battery_low
- binary_sensor.north_central_PIR_battery_low
- binary_sensor.north_west_PIR_battery_low
- binary_sensor.south_east_PIR_battery_low
- binary_sensor.south_central_PIR_battery_low
- binary_sensor.pergola_PIR_battery_low
- binary_sensor.firepit_PIR_battery_low
- binary_sensor.firepit_2_PIR_battery_low
- binary_sensor.garage_north_PIR_battery_low
- binary_sensor.garage_west_PIR_battery_low
- binary_sensor.courtyard_PIR_battery_low
- binary_sensor.carpark_PIR_battery_low
- binary_sensor.driveway_1_PIR_battery_low
- binary_sensor.driveway_2_PIR_battery_low
- binary_sensor.courtyard_gates_battery
- binary_sensor.front_door_battery
- binary_sensor.awning_vibration_battery
- binary_sensor.catflap_battery
- binary_sensor.south_central_2_pir_batter_low
from: 'off'
to: 'on'
action:
- service: script.notifications
data_template:
speaker: 'media_player.downstairs'
message: '{{trigger.entity_id}} has gone low'
However, the alert message reads like this…
…rather than using the name and showing North East PIR Battery, as in the binary_sensor config.The names display correctly in the front end.
What do I need to change to get the name in the alert instead of the entity ID?