diff --git a/nymea-app/ui/Nymea.qml b/nymea-app/ui/Nymea.qml index d168c11d..26b1904d 100644 --- a/nymea-app/ui/Nymea.qml +++ b/nymea-app/ui/Nymea.qml @@ -137,7 +137,7 @@ ApplicationWindow { } } - property var supportedInterfaces: ["light", "weather", "sensor", "media", "garagegate", "awning", "extendedawning", "shutter", "extendedshutter", "blind", "extendedblind", "button", "notifications", "inputtrigger", "outputtrigger", "gateway"] + property var supportedInterfaces: ["light", "weather", "sensor", "media", "garagegate", "extendedawning", "extendedshutter", "extendedblind", "button", "notifications", "inputtrigger", "outputtrigger", "gateway"] function interfaceToString(name) { switch(name) { case "light": diff --git a/nymea-app/ui/mainviews/DevicesPageDelegate.qml b/nymea-app/ui/mainviews/DevicesPageDelegate.qml index 863e8bee..74d5996a 100644 --- a/nymea-app/ui/mainviews/DevicesPageDelegate.qml +++ b/nymea-app/ui/mainviews/DevicesPageDelegate.qml @@ -88,9 +88,15 @@ Item { case "light": case "media": case "garagegate": - case "shutter": case "blind": + case "extendedblind": + case "shutter": + case "extendedshutter": + case "awning": + case "extendedawning": return buttonComponent + default: + console.warn("DevicesPageDelegate, inlineControl: Unhandled interface", model.name) } } } @@ -150,7 +156,12 @@ Item { Engine.deviceManager.executeAction(device.id, actionTypeId) case "garagegate": case "shutter": + case "extendedshutter": case "blind": + case "extendedblind": + case "awning": + case "extendedawning": + case "simpleclosable": for (var i = 0; i < devicesProxy.count; i++) { var device = devicesProxy.get(i); var deviceClass = Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId); @@ -158,6 +169,8 @@ Item { Engine.deviceManager.executeAction(device.id, actionType.id) } + default: + console.warn("DevicesPageDelegate, inlineButtonControl clicked: Unhandled interface", model.name) } } @@ -193,10 +206,15 @@ Item { } } return count === 0 ? qsTr("All closed") : qsTr("%1 open").arg(count) + case "blind": + case "extendedblind": + case "awning": + case "extendedawning": case "shutter": + case "extendedshutter": return qsTr("%1 installed").arg(devicesProxy.count) } - console.warn("Unhandled interface", model.name) + console.warn("DevicesPageDelegate, inlineButtonControl: Unhandled interface", model.name) } font.pixelSize: app.smallFont elide: Text.ElideRight @@ -220,9 +238,15 @@ Item { case "light": return "../images/system-shutdown.svg" case "garagegate": - case "shutter": case "blind": + case "extendedblind": + case "awning": + case "extendedawning": + case "shutter": + case "extendedshutter": return "../images/down.svg" + default: + console.warn("DevicesPageDelegate, inlineButtonControl image: Unhandled interface", model.name) } } }