Window not showing up as window (Homematic HM-Sec-RHS)

I have several Homematic HM-Sec-RHS in my home. Lately I’ve been using the auto-generated area dashboards and today I discovered, that these sensors won’t show up as windows.

Looking up the sensors attributes solved a possible “why”:

options: closed, tilted, open
interface_id: OpenCCU-BidCos-RF
address: JEQ026****:1
model: HM-Sec-RHS
parameter: STATE
function: null
value_state: valid
device_class: enum
icon: mdi:door
friendly_name: Kitchen Door

Every other sensor-type has “window” set as device class:

interface_id: OpenCCU-BidCos-RF
address: MEQ018****:1
model: HM-Sec-SCo
parameter: STATE
function: null
value_state: valid
device_class: window
friendly_name: Bathroom Window

What I’ve tried:
A) I tried changing the device class via YAML:

homeassistant:
  customize:
    sensor.kitchen_door:
      device_class: window

This changes the device class, but the sensor won’t show up in the auto-generated dashboard. Also in the entity options there is no option to choose a “show as” (window, door, …). Which makes me believe, that I merely made a cosmetic change.

B) I tried creating a template:

template:
  - binary_sensor:
      - name: "Kitchen Door Window"
        unique_id: kitchen_door_window
        device_class: window
        state: >
          {{ states('sensor.kitchen_door') in ['open', 'tilted'] }}

This does work better. However it is super annoying, that I now have 2 separate entities in separate places (within the device and as a helper) for all my 8 sensors. I would love to somehow show them in the same place.

Is there a recommended way to make the device visible as a “proper” window?

I did find a way:

If you create a template binary sensor and define it as window from the UI, you have the option to assign it to a device. Configuration looks like this:

YAML is:
{{ states('sensor.schlafzimmer_fenster_rechts') in ['open', 'tilted'] }}

where obviously sensor… is your own sensor.