Skip to content

Commit 4098d69

Browse files
committed
Europe fix as RealTimePower sometimes not available
1 parent 2911af8 commit 4098d69

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/lib/bluelink-regions/europe.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,10 @@ export class BluelinkEurope extends Bluelink {
420420
status.Green.ChargingInformation.Charging.RemainTime > 0
421421
) {
422422
isCharging = true
423-
chargingPower = status.Green.Electric.SmartGrid.RealTimePower
423+
// check for charging power as sometimes not available
424+
if (status.Green.Electric && status.Green.Electric.SmartGrid && status.Green.Electric.SmartGrid.RealTimePower) {
425+
chargingPower = status.Green.Electric.SmartGrid.RealTimePower
426+
}
424427
}
425428

426429
// check for charge limits

src/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version":"v1.3.0"
2+
"version":"v1.3.1"
33
}

0 commit comments

Comments
 (0)