From 18338568b439f82657b78892b76e1ed5dcf66b89 Mon Sep 17 00:00:00 2001 From: mueller-ma Date: Sun, 21 Apr 2024 09:51:52 +0200 Subject: [PATCH] Map more Item types to Device Control types Signed-off-by: mueller-ma --- .../habdroid/background/ItemsControlsProviderService.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mobile/src/main/java/org/openhab/habdroid/background/ItemsControlsProviderService.kt b/mobile/src/main/java/org/openhab/habdroid/background/ItemsControlsProviderService.kt index 5dd5759302..03772588ca 100644 --- a/mobile/src/main/java/org/openhab/habdroid/background/ItemsControlsProviderService.kt +++ b/mobile/src/main/java/org/openhab/habdroid/background/ItemsControlsProviderService.kt @@ -449,6 +449,9 @@ fun Item.getDeviceType() = when (category?.lowercase()?.substringAfterLast(':')) isOfTypeOrGroupType(Item.Type.Contact) -> DeviceTypes.TYPE_WINDOW isOfTypeOrGroupType(Item.Type.Player) -> DeviceTypes.TYPE_TV isOfTypeOrGroupType(Item.Type.Switch) -> DeviceTypes.TYPE_GENERIC_ON_OFF + isOfTypeOrGroupType(Item.Type.Dimmer) -> DeviceTypes.TYPE_LIGHT + isOfTypeOrGroupType(Item.Type.Color) -> DeviceTypes.TYPE_LIGHT + isOfTypeOrGroupType(Item.Type.Image) -> DeviceTypes.TYPE_CAMERA else -> DeviceTypes.TYPE_UNKNOWN }