The automation below sends a script notification to my phone and a media player. The entity ID’s are rather long. Is there any way to send a truncated name in the notifications?
-Thanks
alias: Water Sensors Notification
description: ""
triggers:
- trigger: state
entity_id:
- binary_sensor.water_sensor_half_bath_water
- binary_sensor.water_sensor_air_conditioner_water
- binary_sensor.water_sensor_dishwasher_water
- binary_sensor.water_sensor_bernard_bath_toilet_water
from: "off"
conditions: []
actions:
- action: script.notification_text_message_to_pixel_8
metadata: {}
data:
message: Water leak detected by device {{ trigger.entity_id }}
- action: notify.mobile_app_pixel_8
metadata: {}
data:
priority: high
message: >-
Water leak detected by device {{ trigger.entity_id }} at {{
now().strftime('%H:%M %A %B %d %Y ') }}
enabled: false
- action: tts.speak
metadata: {}
data:
cache: false
media_player_entity_id: media_player.office
message: Water leak detected by device {{ trigger.entity_id }}
enabled: true
target:
entity_id: tts.google_translate_en_com
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.vswitch
enabled: false
mode: single