Device class "open door" (or possibility to reverse values)

Would like to see a device class added where off = open and on = closed (e.g. open_door).

For instance, if you have the airconditioning on, you may want to be notified of open doors/windows rather than closed ones. I now dealt with it through a template binary sensor that reverses the output of my zwave door sensor but that has its limitations. The output is now ‘on/off’ and not ‘closed/open’. That would be solved by a template sensor and an icon, however the icon won’t change color. For that I also need a template for the entity_picture in order to get a colored and standard version of the icon. Which I have to make myself and store in the www folder. And when using entity_pictures, the size is different. Etc… etc… :slight_smile:

Bottom line, either a new device_class or the possibility to reverse the values of the existing ones would be pretty cool. That would allow immediately for other use cases like for instance to use for indicating that there is no more sound coming from a system (sound class on=silence / off=sound), plants need water (moisture class on=no moisture (too dry) off = moisture (normal). Or combine the normal with the reverse to also know when too wet, etc…

While writing I came up with another possibility, simply allowing to configure an “on” value and an “off” value for the front-end when setting up the template. Maybe that’s even the best one. Most flexibility.