Skip to content

Commit fa5b42c

Browse files
committed
fix chargingstate bug
1 parent 9c131ac commit fa5b42c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
## [Unreleased]
66
- No unreleased changes so far
77

8+
## [0.36.4] - 2022-02-12
9+
### Fixed
10+
- Fixes bug in charging state API fixing procedure
11+
812
## [0.36.3] - 2022-02-11
913
### Fixed
1014
- Fixes login again after changes in the login form
@@ -495,7 +499,8 @@ Minor fix in observer interface
495499
## [0.1.0] - 2021-05-26
496500
Initial release
497501

498-
[unreleased]: https://github.com/tillsteinbach/WeConnect-python/compare/v0.36.3...HEAD
502+
[unreleased]: https://github.com/tillsteinbach/WeConnect-python/compare/v0.36.4...HEAD
503+
[0.36.4]: https://github.com/tillsteinbach/WeConnect-python/releases/tag/v0.36.4
499504
[0.36.3]: https://github.com/tillsteinbach/WeConnect-python/releases/tag/v0.36.3
500505
[0.36.2]: https://github.com/tillsteinbach/WeConnect-python/releases/tag/v0.36.2
501506
[0.36.1]: https://github.com/tillsteinbach/WeConnect-python/releases/tag/v0.36.1

weconnect/elements/charging_status.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def update(self, fromDict, ignoreAttributes=None): # noqa: C901
4747
ChargingStatus.ChargingState.ERROR]:
4848
chargePower_kW = 0.0
4949
LOG.debug('%s: Attribute chargePower_kW is %s while chargingState is %s. Setting 0 instead',
50-
self.getGlobalAddress(), fromDict['value']['chargePower_kW'], self.climatisationState.value)
50+
self.getGlobalAddress(), fromDict['value']['chargePower_kW'], self.chargingState.value)
5151
self.chargePower_kW.setValueWithCarTime(chargePower_kW, lastUpdateFromCar=None, fromServer=True)
5252
else:
5353
self.chargePower_kW.enabled = False
@@ -61,7 +61,7 @@ def update(self, fromDict, ignoreAttributes=None): # noqa: C901
6161
ChargingStatus.ChargingState.ERROR]:
6262
chargeRate_kmph = 0.0
6363
LOG.debug('%s: Attribute chargeRate_kmph is %s while chargingState is %s. Setting 0 instead',
64-
self.getGlobalAddress(), fromDict['value']['chargeRate_kmph'], self.climatisationState.value)
64+
self.getGlobalAddress(), fromDict['value']['chargeRate_kmph'], self.chargingState.value)
6565
self.chargeRate_kmph.setValueWithCarTime(chargeRate_kmph, lastUpdateFromCar=None, fromServer=True)
6666
else:
6767
self.chargeRate_kmph.enabled = False

0 commit comments

Comments
 (0)