I want to create a sensor, its value should be calculated out or other entities and attributes.
I defined a function in a Pyscript file, which I exposed as a service. This works fine.
How can I create an entity that uses this function for its value.
I also would like to attach that function to a new attribute of an existing value.
Setting these in the function works, but I would like to sync them automatic, if the underlaying values change, like in the template integration.
Maybe it’s possible to create a template out of Pyscript??