Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display of current + voltage for single-phase pvinverters #1892

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chriadam
Copy link
Contributor

@chriadam chriadam commented Feb 5, 2025

The /Ac/Current and /Ac/Voltage paths for pvinverters are deprecated / no longer valid.

Instead, determine whether there is a single valid phase available for a given pvinverter, and if so, export that phase's current and voltage as properties.

(If multiple valid phases exist, we cannot export valid aggregate values for current or voltage, so return NaN.)

Contributes to issue #1883

Contributes to issue #1713 in the case where only a single valid phase exists in the pvinverter device.

The /Ac/Current and /Ac/Voltage paths for pvinverters are
deprecated / no longer valid.

Instead, determine whether there is a single valid phase
available for a given pvinverter, and if so, export that
phase's current and voltage as properties.

(If multiple valid phases exist, we cannot export valid
aggregate values for current or voltage, so return NaN.)

Contributes to issue #1883

Contributes to issue #1713 in the case where only a
single valid phase exists in the pvinverter device.
@chriadam chriadam force-pushed the chriadam/pvinverter-single-valid-phase branch from 55edcf4 to 6fde078 Compare February 5, 2025 06:47
readonly property real power: _power.isValid ? _power.value : NaN
readonly property real voltage: _voltage.isValid ? _voltage.value : NaN
readonly property real current: _validSinglePhase ? _validSinglePhase.current : NaN
readonly property real voltage: _validSinglePhase ? _validSinglePhase.voltage : NaN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see this data being useful in other multi-phase cases. What if these values could be provided by PhaseModel instead? E.g. if we had PhaseModel properties like current and voltage or overallCurrent and overallVoltage and these were only set in the single-phase case (i.e. when there is only one phase with valid voltage/current/power)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants