Skip to content

Commit

Permalink
Prepare for 0.15.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
tillsteinbach committed Oct 6, 2021
1 parent 7455f7a commit 00b585c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
- No unreleased changes so far

## [0.15.0] - 2021-10-06
### Added
- Statistics about retrieval times

### Fixed
- Climate settings and start stop

### Changed
- Updated API to 0.21.0

## [0.14.14] - 2021-09-28
### Fixed
- Fixed badges
Expand Down Expand Up @@ -289,7 +299,8 @@ All notable changes to this project will be documented in this file.
## [0.1.0] - 2021-05-26
Initial release

[unreleased]: https://github.com/tillsteinbach/WeConnect-cli/compare/v0.14.14..HEAD
[unreleased]: https://github.com/tillsteinbach/WeConnect-cli/compare/v0.15.0..HEAD
[0.15.0]: https://github.com/tillsteinbach/WeConnect-cli/releases/tag/v0.15.0
[0.14.14]: https://github.com/tillsteinbach/WeConnect-cli/releases/tag/v0.14.14
[0.14.13]: https://github.com/tillsteinbach/WeConnect-cli/releases/tag/v0.14.13
[0.14.12]: https://github.com/tillsteinbach/WeConnect-cli/releases/tag/v0.14.12
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
weconnect~=0.20.15
weconnect~=0.21.0
ascii_magic~=1.6
9 changes: 9 additions & 0 deletions weconnect_cli/weconnect_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def main(): # noqa: C901 # pylint: disable=too-many-statements,too-many-branche
help='Radius in meters around the chargingLocation to search for chargers')
parser.add_argument('--no-capabilities', dest='noCapabilities', help='Do not add capabilities', action='store_true')
parser.add_argument('--no-pictures', dest='noPictures', help='Do not add pictures', action='store_true')
parser.add_argument('--elapsed-statistics', dest='elapsedStatistics', help='Statistics over server response times', action='store_true')

parser.set_defaults(command='shell')

Expand Down Expand Up @@ -260,13 +261,21 @@ def observer(element, flags):
weConnect.persistTokens()
if not args.noCache:
weConnect.persistCacheAsJson(args.cachefile)
if args.elapsedStatistics:
print(f'Minimum response time {weConnect.getMinElapsed()}')
print(f'Average response time {weConnect.getAvgElapsed()}')
print(f'Maximum response time {weConnect.getMaxElapsed()}')
print(f'Total response time {weConnect.getTotalElapsed()}')
except errors.AuthentificationError as e:
LOG.critical('There was a problem when authenticating with WeConnect: %s', e)
sys.exit(-1)
except errors.APICompatibilityError as e:
LOG.critical('There was a problem when communicating with WeConnect.'
' If this problem persists please open a bug report: %s', e)
sys.exit(-1)
except errors.RetrievalError as e:
LOG.critical('There was a problem when communicating with WeConnect: %s', e)
sys.exit(-1)


class WeConnectShell(cmd.Cmd):
Expand Down

0 comments on commit 00b585c

Please sign in to comment.