in ,

Change the icon of a binary sensor in home assistant

changement d'icones sur un capteur binaire device_class

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:

homeassistant:
  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 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.

Report

Advocate

Written by Nicolas

Community ModeratorVerified UserStory MakerYears Of MembershipContent Author

Comments

Leave a Reply

GIPHY App Key not set. Please check settings

    Loading…

    0
    Capteur de température zigbee sonoff

    Sonoff SNZB-02 temperature and humidity sensor test

    Capteur d'ouverture zigbee Sonoff

    Sonoff SNZB-04 Zigbee 3.0 Door Sensor Test