If you have a door / window sensor, you may have noticed that Home Assistant does not magically know if the sensor is on a door, garage door, window, or something else. By default, the sensor appears as a door sensor, and then with one icon for a door.
But, really, we want the sensor to represent what it is used for, for example, one window.
Fear not – it’s really very easy to change this.
After the sensor has been added, go to “Configuration” and at the bottom of the page you will find “Customizations”. Here it is possible to change all entities.
Search for the sensor you want to change. In the overview, you will now have one choice to edit “device class”. If there is a window sensor that you want to correct, you can easily choose the right “window” in the list. Then it gets, among other things, the right icon.