How do I create a door sensor with a door icon

I trying to programatically create a device with a door icon. The nearest I have come is to create a device with a contact sensor icon and then manually change it to a door icon. Surely there is a way of creating it directly with a door icon.

Here are the results of my testing so far with different device profile settings.

Category = Door
ocfdevicetype = blank
resulting icon = a contact sensor icon (nb. you can edit the device and change the icon to a door)

Category = Door
ocfdevicetype = x.com.st.d.sensor.door
resulting icon = The others icon with 2 circles and 2 squares

Category = Door
ocfdevicetype = oic.d.door
resulting icon = The others icon with 2 circles and 2 squares

Category = GarageDoor
ocfdevicetype = oic.d.garagedoor
resulting icon = A garage door icon

Hi, @Tim99
We’re looking into some details about this specific icon.

However, normally, the icon is set based first on the property ocfdevicetype and if it doesn’t work, it will use the category to set an icon.

Once we have more info about this specific icon, we’ll let you know if there’s a workaround to set it through the code.

1 Like

Thank you for investigating this. I am writing a driver for a security product and I also need to create a window sensor directly

1 Like