Closed filmgarage closed 3 years ago
Try to set the icon to empty and see if that works. I will look into this also but right now I don't have access to the system.
I am not sure if I understand you correctly with setting the icon to 'empty'... Like the following in the customize section?
homeassistent:
customize:
binary_sensor.some_shelly_switch
device_class: door
icon:
I tried this an it has no effect, but maybe I should try something else?
Sorry, it took some time to update, working now with the above code!
Environment
Describe the bug
I added the three inputs of the shelly i3 as switches, but they default to a switch icon in Lovelace (mdi:light-switch)
But my inputs are not always fysical switches. I use the i3 to make all kinds of sensors smart: For this use I change the device_class to door, lock, there are plenty types: https://www.home-assistant.io/integrations/binary_sensor/#device-class After changing the
device_class
the states are right for their type (open/close, wet/dry, locked/unlocked) However the icon does not represent thedevice_class
and remains a 'switch'.I can change the icon back to a door, lock, etc but In that case we lose the ability to have a "dynamic icon", that changes to show the state of the
binary_sensor
.Steps to Reproduce
binary_sensor
entities:device_class: door
Expected behavior
Icon of the entity changes to a door that shows open or closed state
Screenshots
Traceback/Error logs
No related error logs, I assume that the switch icon is a feature, however it limits the use of the
binary_sensor
abilities.Additional context