Skip to content

Commit

Permalink
Map more Item types to Device Control types
Browse files Browse the repository at this point in the history
Signed-off-by: mueller-ma <[email protected]>
  • Loading branch information
mueller-ma committed Apr 21, 2024
1 parent 9a2a127 commit 1833856
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 1833856

Please sign in to comment.