Improving the bad sensor (mqtt) - how to?

Hi, I’m total newbee with HA and I need some help with sensors.
I have a integration with SUPLA system via mqtt.
I have many sensors that work fine but they seem to be not full functional.
For example temperature sensor shows temp in good units but if I add it to the specific area it is supposed to be in the left bottom corner but it isn’t. As I tried to solve it, I found out that my sensors do not have device_class. The attributes looks like:

state_class: measurement
unit_of_measurement: °C
friendly_name: Temp zew

The similar problems are with other sensors like water meter (cannot add to the Energy dashboard), pressure, humidity, etc… they work but I can’t use them in full options.
I tried with template, for example:

template:
  - sensor
      - name: "Salon_new"
        state: >
            {{ states('sensor.salon_bme_2') }}
        unit_of_measurement: "°C"
        device_class: temperature
        friendly_name: "Temp salon"
        unique_id: “1234tempsalon”

and I supposed to get new entity but it didn’t happened.
What should I do?

Your sensor may be getting an error as the “sensor” line should end in a colon. Have a look in the logs to see if you’re getting an error.

template:
- sensor:

Unfortunatelly that was not the problem. Still the new entity is not created, no error in logs. But solution of my problem solved in different way https://www.home-assistant.io/docs/configuration/customizing-devices/