Automation checking a list

Hi all,

I’ve made a receiver for 433Mhz remotes, it is connected to home assistant via ESPhome, and (when decoded succesfully) it reports the output to home assistant in the form of 2 text sensors.

  • 1 for the button that was pressed (A/B/C/D)
  • 1 for the remote_id (6 digit serial number of the remote).

I would like to make some automations that trigger on these text sensor values, but i only want my automation to run when it comes from a “valid remote”, one that is mine so to say, i don’t want it to trigger when a neigbour has the same brand of remotes.

Is there a place in home assistant where i can centrally maintain a list of valid remotes, and have my automations check that list ?
Centrally, because i don’t want to maintain that list over several automations.

I was thinking of something along the lines of a template sensor containing the list, and have been searching here on the forum and googling around a bit, but have not found something that seems to fit my use case, is there something i’ve missed, or am i looking in the wrong direction ?

Store the list of valid remotes in an Input Select.