Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 107896

How to add an icon to a new sensor needed for Lovelace?

$
0
0

Lovelace can not format values so I need to create new sensors with rounded values instead of 24,22 nicer looking 24. I do not wanna change it manually through the interface cause that is unreliable if you change the sensor title later.

I tried this but got an error “invalid option” or so.

  - platform: template
    sensors:
      temperature_printer_via_xiaomi_plug:
        icon: 'mdi:thermometer-lines'
        value_template: "{{ state_attr('switch.chuangmi_plug_m1', 'temperature') | round(0) }}"

Hope someone finds the point I can not see right now. thx

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 107896

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>