I have a SONOFF TH16 working in HA, using HACS etc, I can see the status of the switch no issues. But I would like to display the temperature. I can see this by clicking Attributes of the sensor. I use Grapana for my charts, but again that seems to only see the switch state on the TH16.
I am not using Grafana so no idea bout its capabilities, but other graph tools allow to extract the attrib directly so then you would not need a separate sensor (plotly/apex)
@tom_l question: is there a guideline on when to yes/no add template sensors? In other words, are there downsides to them on e.g. performance, stability, etc. ?
Create them when you need them. e.g. If you only want to display an attribute value in the frontend then the entities card can do that. No template sensor required. However if you want to display a history graph of an attribute you have a couple of choices, (1) create a template sensor and use that in a core history graph card or (2) use a third party card that supports graphing attributes.
Another reason for creating template sensors is to combine more than one state in some way. e.g. The core min_max integration can average a bunch of states but it can’t do a weighted mean, for that you would need a template sensor.
None. Unless you have thousands of them and are trying to run Home Assistant on non recommended hardware like a pi zero.