Device_class: "signal_strength" does not work

The icon does not change either in the sensor declaration or in customize.yaml or both.
Of course I have deleted browser browsing data several times (Chrome).

How would you propose changing the icon for this class?

There are many different types of radio receiver and all have different sensitivity ranges in dBm.

It’s not like a battery where we have 0 to 100%.

There are already **Material Design Icons** that can be used:
mdi:wifi-strength-4 to 1, mdi:wifi-strength-outline, mdi:wifi-strength-off-outline
1 Like

That’s not the issue. The issue is that there is no universal scale in dBm to match to the icons. All radios are different.

This is the sensor template I have to use:

sensor:
  - platform: template
    sensors:
      icono_nivel_senal_wifi_despacho:
        friendly_name: Nivel Señal Wifi Despacho
        unit_of_measurement: 'dBm'
        value_template: '{{ states("sensor.nivel_senal_wifi_despacho") }}' 
        icon_template: >-
          {% set rssi_level = states("sensor.nivel_senal_wifi_despacho") | int %}
          {% if -1 > rssi_level >= -50 %}
            mdi:wifi-strength-4
          {% elif -51 >= rssi_level > -61 %}
            mdi:wifi-strength-3
          {% elif -62 >= rssi_level > -72 %}
            mdi:wifi-strength-2
          {% elif -73 >= rssi_level > -83 %}
            mdi:wifi-strength-1
          {% elif -84 >= rssi_level > -94 %}
            mdi:wifi-strength-outline
          {% else %}
            mdi:wifi-strength-off-outline
          {% endif %}

This use is for WiFi connections

And would that wifi range apply to Bluetooth? Zigbee? 433MHz ISM? Zwave?

Answer: no, no it would not.

The device class covers more than just wifi.

So it seems that it is best to have different Classes depending on the type of Radio since it is very important to know directly in the Application the feasibility of the connection when installing new device.

Far easier to allow the user to implement things like this:

Screenshot_2020-05-19 Overview - Home Assistant

1 Like

I suppose that it is a summary of connections to have, for example, on a main screen, not on the individual screen of each device.
Visually it is more attractive and I suppose it requires manual editing of the yaml using templates.
I think that facilitating the use of Home Assistant is using the manual edition as little as possible, it is what it seems that the new versions improve and in any monitoring and remote control system the connection is the most important and critical.

Nope. The bar card supports Lovelace UI editing.

I have been looking at it and it must be a custom card because the visual editor of Home Assistant UI only has the “Indicator” type, which is very good although it is only of the Gauge type

Correct. Easy to install once you have HACS set up.

Successfully, I did not want to install HACS since I now have 10% more RAM memory occupied.


For Color severity to work I have had to invert the values of “From” and “To”.

It is much better, but I still think that classes based on the radio types, as the basis of lovelace would be easier. By the way, when installing the Android Mobile Application, the new smartphone device that appears already has the dynamic icons of the Battery and Signal Strength integrated.
Mi 9T

Battery class I don’t have an issue with, 20% capacity is 20% and you can set the appropriate icon.