Trigger based template sensor to store global variables

@TheFes @123

Thanks Both.

Coming back to this template sensor, are we concluding that it does not support key names using variables?

also, if you know of another way that might solve my issue
(Automation to publish and update notification on secondary MQTT trigger (frigate) - #9 by umbramalison)