Skip to content

Commit

Permalink
Show digital input label
Browse files Browse the repository at this point in the history
Instead of deriving the input number from the path.
To support the digital inputs of the IO extender.

victronenergy/venus#1412
  • Loading branch information
ReinvdZee committed Jan 31, 2025
1 parent f6f31c5 commit 2140afb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pages/settings/PageSettingsIntegrations.qml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ Page {

VeQItemSortTableModel {
id: digitalModel
filterRegExp: "/[1-9]$"
model: VeQItemTableModel {
uids: [ Global.systemSettings.serviceUid + "/Settings/DigitalInput" ]
uids: [ BackendConnection.serviceUidForType("digitalinputs") + "/Devices" ]
flags: VeQItemTableModel.AddChildren | VeQItemTableModel.AddNonLeaves | VeQItemTableModel.DontAddItem
}
}
Expand All @@ -132,13 +131,15 @@ Page {

GradientListView {
model: digitalModel

delegate: ListRadioButtonGroup {
//: %1 = number of the digital input
//% "Digital input %1"
text: qsTrId("settings_io_digital_input").arg(model.uid.split('/').pop())
text: buttonLabel.value || ""
dataItem.uid: model.uid + "/Type"
optionModel: delegateOptionModel

VeQuickItem {
id: buttonLabel
uid: model.uid + "/Label"
}
}
}
}
Expand Down

0 comments on commit 2140afb

Please sign in to comment.