Skip to content

Commit

Permalink
fix: Display battery voltage when power unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
mman committed Oct 11, 2024
1 parent b6f1de2 commit 7b8e186
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ export const BatteryValues: FC<Props> = ({ battery, boxSize, electricalPowerIndi
<ValueWithUnit value={battery.power} unit="W" />
</div>
)}
{showWatts && battery.power === undefined && (battery.voltage || battery.voltage === 0) && (
<div className={classNames("text-victron-gray dark:text-victron-gray-dark", activeStyles.values)}>
<ValueWithUnit value={battery.voltage} unit="V" />
</div>
)}
</div>
<div className={classNames("text-victron-gray dark:text-victron-gray-dark", activeStyles.state)}>
{batteryStateFor(battery.state, battery.bmsstate, battery.timetogo ?? null)}
Expand Down

0 comments on commit 7b8e186

Please sign in to comment.