RedditPP Mascot

RedditPP

r/homeassistant • … • u/sryan2k1

Getting the light entity from a triggered event

I have some Inovelli switches that trigger an event for "Scene 003" when the config button is pushed, and I'm trying to use a script to trigger notifications on the built in LED strip via a script on the device that triggered the action.

I've put this together to find the light entity for that device, but I'm fairly new to HA and curious if there was a cleaner way of doing it:

`{{ device_entities(device_id(trigger.entity_id)) | select('match', 'light.') | first }}`

— 0