Are script variables available to populate a sensor?

Self explanatory title?

If I have several scripts all passing the same variables between them, is it possible to simply have script 1 somehow populate a sensor with all the variables as attributes?

The benefit of this would be a lot less code needs to be typed so making everything easier to read/maintain.

Hi @klogg

I haven’t tried this mayself but this may be of use:

https://community.home-assistant.io/t/trigger-based-template-sensor-to-store-global-variables/735474

1 Like

Hi.

Nor have I but I am certainly loking at it now!!

Thank you!!

It works a treat!

1 Like