Only handle things as disconnected when they implement the connectable interface
This commit is contained in:
parent
d12ac8eacd
commit
92e001b332
@ -8,7 +8,7 @@ BigTile {
|
||||
|
||||
property Thing thing: null
|
||||
|
||||
readonly property State connectedState: thing.stateByName("connected")
|
||||
readonly property State connectedState: thing.thingClass.interfaces.indexOf("connectable") >= 0 && thing.stateByName("connected")
|
||||
readonly property bool isConnected: connectedState === null || connectedState.value === true
|
||||
readonly property bool isEnabled: thing.setupStatus == Thing.ThingSetupStatusComplete && isConnected
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ InfoPaneBase {
|
||||
readonly property bool setupFailure: root.thing.setupStatus == Thing.ThingSetupStatusFailed
|
||||
readonly property State batteryState: root.thing.stateByName("batteryLevel")
|
||||
readonly property State batteryCriticalState: root.thing.stateByName("batteryCritical")
|
||||
readonly property State connectedState: root.thing.stateByName("connected")
|
||||
readonly property State connectedState: root.thing.thingClass.interfaces.indexOf("connectable") >= 0 && root.thing.stateByName("connected")
|
||||
readonly property State signalStrengthState: root.thing.stateByName("signalStrength")
|
||||
readonly property State updateStatusState: root.thing.stateByName("updateStatus")
|
||||
readonly property State childLockState: root.thing.stateByName("childLock")
|
||||
|
||||
@ -89,7 +89,7 @@ RowLayout {
|
||||
Layout.preferredHeight: Style.smallIconSize
|
||||
Layout.preferredWidth: height
|
||||
thing: root.thing
|
||||
visible: root.thing.setupStatus == Thing.ThingSetupStatusComplete && (hasSignalStrength || !isConnected)
|
||||
visible: root.thing.setupStatus == Thing.ThingSetupStatusComplete && root.thing.thingClass.interfaces.indexOf("connectable") >= 0 && (hasSignalStrength || !isConnected)
|
||||
Binding { target: connectionStatusIcon; property: "color"; value: root.color; when: root.color !== Style.iconColor }
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
@ -130,6 +130,7 @@ MainPageTile {
|
||||
id: devicesSubProxyConnectables
|
||||
engine: _engine
|
||||
parentProxy: thingsProxy
|
||||
shownInterfaces: ["connectable"]
|
||||
filterDisconnected: true
|
||||
}
|
||||
ThingsProxy {
|
||||
|
||||
Reference in New Issue
Block a user