Hello,
I have a sensor which becomes unavailable at certain times, which also creates gaps in the graphs.
I would like to prevent this with a template sensor of the original sensor. So my approach was to make a template sensor which copies the value, except for when it retrieves an error.
Currently I have this:
You can manually change the value of sensor.pv_gen_meter to ‘unavailable’ in Developer Tools → States if you want to test it now. It will revert to a number next time the sensor updates.
Click on the entity in the list then up the top of the page: