Rather than maintaining an ever growing list of binary type device classes to support things like people having windows that open horizontally or gates or mailboxes, etc…
Could a custom device class option be implemented that would be defined something like this:
device_class:
- binary_sensor:
- <device_class_name>:
state_off: <off state word>
state_on: <on state word>
icon_off: <mdi icon for off state>
icon_on: <mdi icon for on state>
All options under name would be optional with undefined options defaulting to the device_class: none
states and icons.
e.g.
device_class:
- binary_sensor:
- gate:
state_off: 'Closed'
state_on: 'Open'
icon_off: 'mdi:gate'
icon_on: 'mdi:gate-open'
- maibox:
state_off: 'Empty'
state_on: 'Full'
icon_off: 'mdi:mailbox'
icon_on: 'mdi:mailbox-up'
EDIT: Cover and switch device classes too, see post 5 in this FR.