I’m stuck here… it just says Ljust no matter what I do. input_number.lux_morkt is at 3, input_number.lux_ljust is at 12, and the sensor itself says 1 lx right now,
As tom commented, you need a pipe | between float and round. Also, your floats on the sensor states will need a default value in case they are “unknown” or “unavailable”.
{% set illum = states('sensor.vardagsrum_sensor_illuminance') | float(0) %}
{% if illum > states('input_number.lux_ljust') | float | round %}
Ljust
{% elif illum < states('input_number.lux_morkt') | float | round %}
Mörkt
{% elif states('input_number.lux_ljust') | float | round > illum > states('input_number.lux_morkt') | float | round %}
Skumt
{% else %}
Error
{% endif %}