A way to create entities in a script?

Hello,

I have a script that polls information from my heating system.
Depending on the configuration of my heating system, additional parameters could become available. My script gets a list of all of these.
Now, I would like my script to create an entity for each parameter of my heating system and update this entity every 300s.

The only way I found was a custom integration. But hat seems very complex…

Greetings,
Hendrik

I mostly use mqtt sensors for scripts.

Uh, the code is broken in formatting.
But I get your point: my script sends to mqtt and then I read the values from mqtt.

That’ll work - nice hack!
I’d prefer something directly in HA, but it would be ok.

The code is broken in the preview of the link.
Click the blue text and go to the original thread to get the post with a proper formatting.