Sensor state and text formatting

I’m developping a custom component to have french weather alerts. I’m wondering if we can put in the sensor.state string some formatting (text or html) interpreted by the frontend.
My first test seems not conclusive ‘\n’ are not taken into account and html tags are displayed.

Is it possible? If no what are the alternatives and good practices? Alert component? templating? Custom Cards?