I would create a warning code that the carbon level has risen to more than 2000 parts per million. In this card, I did this code, but I did not know how to put it. If the rate is less than 2000, it is normal, and if it is greater than 2000, a note is written.
{% if is_state('sensor.blueair_my_room_co2', '1000') %}
<ha-alert alert-type="success">
CO2 levels are normal.
</ha-alert>
{% else %} <ha-alert alert-type="error">
Warning: CO2 levels are high in my room!
</ha-alert> {% endif %}
Can I write this code like this:
{% if is_state('sensor.blueair_my_room_co2', < '1000') %}