Using a sensor value to control the brightness of a light in HA

I’ve put it in the template editor and it worked, the value of the pot is displayed! Already a victory for me! :sweat_smile:

But I still get the same error as before:


Message malformed: expected float for dictionary value @ data['brightness_pct]

I think I have to convert the variable type form string to float. But I don’t know how to do that.

Thank you very much! :slight_smile: