I have a an automation that´s read ups if an error occurs according to specific conditions. That´s works fine. The issue is that when it´s reads up the error from the sensor it also reads up the underscore.
I´m using:
{{states(‘sensor.roger_error’)}}
where the sensor consist of the error e.g. “collision_sensor_problem_front” however I would like it to be read out the friendly name which I see in e.g. History of the sensor which is “Front collision sensor problem”
But it´s not the friendly name of the sensor itself I would like to have but the friendly name of the state of the sensor. How do I get that, or does´t that exist? But in that case how could I remove the underlines.
I don’t think states have friendly names. There are similar issues with weather forecasts, where there are a lot of hyphens which voice assistants stumble over. I use a template sensor to tidy them up: