Is it somehow possible to set the status of a template sensor, let’s say a binary sensor from an automation?
And if so, can I also set an attribute? Here is an example:
Would result in a binary sensor named testsensor with a value true when binary_sensor.something has the value ‘on’
It also has some attributes: testvalue and version. Now I want to call a service that sets another value to this sensor. Also I want to be able to maiplulate the attribute value… Can this be done without custom components?
Yes, you can switch to a trigger-based template sensor that has multiple triggers. A State trigger will get you similar function to the state-based template sensor. Then add a second trigger to override the value. I would probably go with an Event trigger since they don’t require any extra entities and can be customized by type and event data content.