Fix erraneously displayed powet switch in generic list page
This commit is contained in:
parent
eea91a2d7f
commit
6445d2dc59
@ -107,20 +107,6 @@ DeviceListPageBase {
|
||||
ThingStatusIcons {
|
||||
thing: itemDelegate.thing
|
||||
}
|
||||
|
||||
Switch {
|
||||
visible: itemDelegate.powerState !== null
|
||||
checked: itemDelegate.powerState && itemDelegate.powerState.value === true
|
||||
enabled: itemDelegate.isEnabled
|
||||
onClicked: {
|
||||
var params = [];
|
||||
var param1 = {};
|
||||
param1["paramTypeId"] = itemDelegate.powerState.stateTypeId;
|
||||
param1["value"] = checked;
|
||||
params.push(param1)
|
||||
engine.deviceManager.executeAction(itemDelegate.thing.id, itemDelegate.powerState.stateTypeId, params)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ DevicePageBase {
|
||||
|
||||
title: qsTr("This switch has not been used yet.")
|
||||
text: qsTr("Press a button on the switch to see logs appearing here.")
|
||||
visible: logView.logsModel.count === 0
|
||||
visible: !logsModel.busy && logsModel.count === 0
|
||||
buttonVisible: false
|
||||
imageSource: "../images/system-shutdown.svg"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user