I am using the following to get the current installed version of Pi-Hole
#Pihole Version
- platform: command_line
name: Pi-Hole Version
command: "pihole -v"
Which gives me the following output
Pi-hole version is v4.2.2 (Latest: v4.3)
AdminLTE version is v4.2 (Latest: v4.3)
FTL version is v4.2.3 (Latest: v4.3.1)
I’m using an entity card to display this sensor - but was wondering if there is a way to either split the 3 lines into 3 sensors or at least format the result some way - as it currently displays like this
Ideally - I’d like a way of knowing when a new version is available, but haven’t found anything like this as of yet
Any suggestions would be appreciated!
The Pi-Hole API has a way to report whether updates are available (replace the ip address with your pi-hole server address) - http://192.168.1.40/admin/api.php?versions
Lesson in scripting though, as long as the output format doesn’t change from what you are seeing, you could run three separate commandline sensors, viz