From 00b585cc923419f8ad51131712ea8d81196863ba Mon Sep 17 00:00:00 2001 From: Till Steinbach Date: Wed, 6 Oct 2021 14:06:55 +0200 Subject: [PATCH] Prepare for 0.15.0 release --- CHANGELOG.md | 13 ++++++++++++- requirements.txt | 2 +- weconnect_cli/weconnect_cli.py | 9 +++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c37334..2c57b4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/requirements.txt b/requirements.txt index 2659e1d..e31a846 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -weconnect~=0.20.15 +weconnect~=0.21.0 ascii_magic~=1.6 diff --git a/weconnect_cli/weconnect_cli.py b/weconnect_cli/weconnect_cli.py index d4ffdcb..84a5b60 100644 --- a/weconnect_cli/weconnect_cli.py +++ b/weconnect_cli/weconnect_cli.py @@ -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') @@ -260,6 +261,11 @@ 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) @@ -267,6 +273,9 @@ def observer(element, flags): 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):