I can create a template cover, and say it’s a window by saying: ‘device_class: window’, and it appears as a window in Hass. In Homekit, though, it appears as a shutter.
(The Homekit YAML version allows setting the type, but it doesn’t include windows.)
Reviving this old thread since I’m trying to figure out the same on the latest HA. I’ve customized device_class to window as well, but showing as shutter.
Replying to myself as I figured it out. It seems that I mistakenly thought that customizations to entities made in the UI would "just work"™. I hadn’t added
homeassistant:
customize: !include customize.yaml
to my config, so the customizations (in this case device_class) wasn’t being reflected. Once I added that, made sure that device_class customization was being picked up, I just excluded the entity from homekit integration, and then readding it.
Hi, yes, customise.yaml is needed for customisation to work - good point.
I’ve discovered you can customise the device class of a template cover, and am moving my virtual devices to them.
(You can’t do that for a command line cover.)
Still, though, you can’t set a template cover’s area…
I just want to confirm that it is definitely possible to make a window show up as an actual window in HomeKit. My Velux Window connected to Home Assistant via the “Somfy Tahoma” (HACS) integration definitely shows up with the right window icon. It shows up as a “PositionableTiltedWindow” in HomeKit.
I do however have the same problem for another window based on the cover template. It incorrectly shows up as a “Cover” in HomeKit. Exactly the problem this thread describes. For the device_type: garage, which I also use, the template for it shows up correctly.
I am here struggling with making an open/close cover (no position control) appear in homekit without slider for setting opening percentage.
When setting device_class to garage I get a open/close toggle switch.
When setting device_class to anything else I get a position slider.
I don’t understand this, as the device does not support setting position.