home assistant icon tip

Nico Writing by Nico
  2 min of reading

This page has been visited ... times

home assistant icon tip

Here is in the series of the very small tutorials . I will quickly describe how to change an icon of a binary sensor thanks to the device_class, by customization in home assistant.

So in normal times to change an icon of an entity of a device, nothing could be simpler:

Configuration >> Entities >> you change the class icon to hass: or mdi: as desired. And it’s over.

But when you want to change the icon of a binary, example: a door opening detector. There it gets complicated because there is an icon for an open position and an icon for a closed position. Don’t worry, Home assistant is in the place.

In this case, the customization must be used in the customize.yaml.

First of all, you have to add the integration line in the configuration.yaml click there and you will find all the information about the configuration of the file.

To keep things simple, you have to add this line:

  customize: !include customize.yaml

Once done go to:

Configuration >> Personalization >> Choose an entity

Modify or create by adding a device_class In general it exists, and there you have a panel of choices (garage door, window, movement …), select in 1 and don’t forget no save.

View this beautiful animated GIF that takes it all right.

modification of a default icon of a device in home assistant

Modification of an icon of a binary sensor in home assistant thanks to the customization of device_class entities Finally, we can say that home assistant has once again thought of everything.



Founding member of the Haade site, a home automation enthusiast with all the tricks that go well.