sender
February 10, 2024, 8:28pm
1
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:
It used to be a round circle like described here:
Binary sensor - Home Assistant (moving)
What do I miss?
EDIT:
Others show as hexagon:
tom_l
February 10, 2024, 10:23pm
2
sender:
The sensor:
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
sender
February 11, 2024, 8:29am
3
tom_l:
binary sensor?
sorry
Indeed docs did not change but I did not as well…
tom_l:
can be replaced with:
Thats more easy
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…
So strange…
when I set to on it is a hexagon
and off it is an arrow
sender
February 11, 2024, 8:45am
4
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).
sender
February 20, 2024, 1:22pm
6
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:
opened 12:43PM - 20 Feb 24 UTC
### The problem
Since I updated to 2024.2 my binary_sensors of device_class mov… ing show wrong icons (an arrow for off, a hexagon for on).
This does not make sense, so I think it is a bug.
I'm not the only one, here you see a short thread about it:
https://community.home-assistant.io/t/device-class-moving-icon-suddenly-changed/688044
### What version of Home Assistant Core has the issue?
core-2024.2.0
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
_No response_
### Link to integration documentation on our website
_No response_
### Diagnostics information
_No response_
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
_No response_
### Additional information
_No response_
1 Like