Skip to content

Commit

Permalink
Handle AC input /Connected value of either 1 or true
Browse files Browse the repository at this point in the history
The backend may publish either 1 or true to indicate
/Ac/In/<x>/Connected is set, so allow for either value.

Fixes #1380
  • Loading branch information
blammit committed Aug 5, 2024
1 parent fa700f7 commit 66ed44b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/common/AcInputSystemInfo.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ QtObject {
property bool isActiveInput
readonly property bool valid: deviceInstance >= 0 && serviceType.length && serviceName.length

readonly property bool connected: _connected.value === 1
readonly property bool connected: !!_connected.value
readonly property int deviceInstance: _deviceInstance.isValid ? _deviceInstance.value : -1
readonly property string serviceType: _serviceType.value || "" // e.g. "vebus"
readonly property string serviceName: _serviceName.value || "" // e.g. com.victronenergy.vebus.ttyO, com.victronenergy.grid.ttyO
Expand Down

0 comments on commit 66ed44b

Please sign in to comment.