Here is a typical output of a sensor I have HA.
Exited (143) 22 hours ago
I want to change the output to remove the numbers in brackets and replace ‘Exited’ with ‘Stopped’. E.g.
Stopped 22 hours ago
I replaced 'Exited' with 'Stopped' easy enough, but I'm having trouble remove the ' (143)' part (the numbers inside the brackets change)
sensor.docker_pi_hole_uptime:
value_template: '{{ states.sensor.pi_hole_uptime | replace("Exited", "Stopped") }}'
It looks like I need to use Regex, which I barely know, and searching returned something like this should do it
replace("\([0-9]{3}\)", "")
That doesn’t work, so I’m hoping someone could help getting this formatted how I want