Device class moving icon suddenly changed

After winter I enable my “led” buttons but the icon changed.

The sensor:

      led:
        device_class: "moving"
        value_template: >-
          {% if is_state('switch.water', 'on') %}
            on
          {% else %}
            off
          {% endif %}
        unique_id: d49f62bb-f207-4b56-ab49-b30c115a8137

It ends up with an icon:
image

It used to be a round circle like described here:
Binary sensor - Home Assistant (moving)

What do I miss?
EDIT:
Others show as hexagon:

Sensor or binary sensor?

If it is a binary sensor:

I could not find a PR for any change and the documentation has not been changed.

BTW this:

      led:
        device_class: "moving"
        value_template: >-
          {% if is_state('switch.water', 'on') %}
            on
          {% else %}
            off
          {% endif %}
        unique_id: d49f62bb-f207-4b56-ab49-b30c115a8137

can be relaced with:

      led:
        device_class: "moving"
        value_template: "{{ is_state('switch.water', 'on') }}"
        unique_id: d49f62bb-f207-4b56-ab49-b30c115a8137

Binary sensor templates only need to return true or false.

And you should be using the new template format for new sensors and binary sensors.

(configuration.yaml)

template:
  - binary_sensor:
      - name: LED
        device_class: "moving"
        state: "{{ is_state('switch.water', 'on') }}"
        unique_id: d49f62bb-f207-4b56-ab49-b30c115a8137

sorry

Indeed docs did not change but I did not as well…

Thats more easy :slight_smile:

I replaced now all sensors that way… same behavior (wrong icons)…

I really do not get why this is happening… all the icons just change to an arrow of hexagon …
I added a unique id to start fiddling around with other icons but that does not help me.

The entity is ok, but it just shows the wrong icons…

image

So strange…

when I set to on it is a hexagon
and off it is an arrow

When I remove the “device class moving” all is fine and back to normal.,

So strange.

EDIT: not yet… 4 out of 5 now have the round icon back… 1 out of 5 not… equally configured

EDIT2: not totally… I removed it here:

And now all are fine fine…

It remains strange that “moving” is now arrow and hexagon…

THANKS FOR THE HELP!

I see the same thing for my binary_sensors of device_class moving. Arrow and hexagon. I liked the old one much better. I can’t imagine why arrow and hexagon could make sense.
First I thought, hexagon = stop sign, but the hexagon is used when there is motion… No idea why this was changed

For me, your solution is not a complete solution, because then I get another text too (in english: on/off) but I do want the text from device_class moving (moving / not moving).

Indeed very strange and not documented…

I do no use the text states, so that’s no problem for me.

I filed an issue and already got an answer:

1 Like