I have a second Raspberry Pi running PiHole along with PiVPN & I’d like to monitor the temp of the processor on that Pi.
I’ve tried a few different ways and haven’t managed to get it working the way I really want (I’m open to suggestions to make it better).
At the moment I have a scrape sensor working but it’s reporting the value as “Temp: 51.5 °C”.
In an ideal world, I would just want the numerical value and the unit of measurement to be “°C”.
(Id like to be able to use this in a graph and also a trigger for automation if needed)
I’m guessing the best way would be with a second sensor & some templating but I’m just not sure how to do the templating etc.
The best thing to do to troubleshoot stuff like this is to use the template tool in the dev tools. You can just plug in the value template and see what it returns.
To tell the truth, I’d completely forgotten about the Dev template tool.
Templating on the whole is something I’m still getting to grips with (I can see from looking at your template what you’ve done, but I’d have no idea how to put that together myself (well,not yet anyways)).
The reason my first one had a % on the end was because I just copied/edited a template I already had… I’m lost writing them from scratch but I have a bit of an understanding now and can hack stuff to suit. The more you do it the easier it gets.
That’s is true, hopefully I’ll get better as time passes.
There is one small issue I’ve noticed. The new template sensor dosnt seem to update when the original changes it’s value.
Woukd it be something like scan interval or force update to to it updated???
I think the issues with it not updating was my error, I’d renamed the original sensor so I could easily tell which was the new/old one & hadn’t updated the new sensor to reflect this - all working now.