I’ve searched and can’t find the solution to this possibly very simple syntax query. I’m trying to make a template sensor that strings together the state of a sensor and a sensor attribute to have them output as one but it’s not working because I don’t know the correct syntax. This is what I have at the moment.
central_details:
friendly_name: Central line full service details
value_template: '{{ state('sensor.central') }} . {{ state_attr(''sensor.central'', ''Description'') }}'
This syntax isn’t working. In this example, if the sensor.central state is “Good Service” and the Description attribute is “Nothing to report”, I’d like my template sensor to output “Good service. Nothing to report.” Without having to create a separate sensor template for the attribute. Can it be done?