I’m so sorry, this is the second time this happens this week… I overlooked the wrong apostrophes…
Take this one instead:
template:
- sensor:
- name: YOUR_NEW_SENSOR_NAME
unit_of_measurement: ppm
device_class: carbon_monoxide
state: >
{{ states('sensor.mq_2') | float(0) * 100 }}
What’s changed are the apostrophes around the sensor name… They need to be " or '.
And btw. if you have time later, please read the forum rules regarding code formatting, it really is important. Not in this case, but if there are errors with indentation it is only findable with the correct formatting.