Hi all, I have some code below that I use to get notification of a printer event (print finished). However, I was looking to add more printers, and wanted to know how I can convert this automation to be more dynamic. I'd like to maybe use labels on the printer (eg, automation-enabled) for new printers and not have to modify the trigger in the future. If you can suggest some revision to this, it would be appreciated. ChatGPT wasn't very helpful...
`
alias: 3D Print Completed
description: Notify when 3d print is completed
triggers:
- device_id: aab90c680f0b33435d25cdeb87914666
domain: bambu_lab
type: event_print_finished
trigger: device - device_id: def4d8e0ee2d097ae5a1674b4eb5e666
domain: bambu_lab
type: event_print_finished
trigger: device
actions: - action: notify.alexa_media_echo_show
metadata: {}
data:
message: The printer {{ trigger.event.data.name }} has finished printing.
mode: single
`