From efb77fe81a24ca0bbd2a7ef7093c4f3c6eaba2af Mon Sep 17 00:00:00 2001 From: Elad Bar Date: Mon, 28 Nov 2022 08:44:43 +0200 Subject: [PATCH] Fix extraction of days to keep video files when settings were not changed (default) --- CHANGELOG.md | 4 ++++ custom_components/shinobi/component/api/api.py | 4 +++- custom_components/shinobi/manifest.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e20c2f..7ad6298 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.27 + +- Fix extraction of days to keep video files when settings were not changed (default) [#39](https://github.com/elad-bar/ha-shinobi/issues/39) + ## 2.0.26 - Hotfix for Media Browser missing validation diff --git a/custom_components/shinobi/component/api/api.py b/custom_components/shinobi/component/api/api.py index 76fc5a1..ef25736 100644 --- a/custom_components/shinobi/component/api/api.py +++ b/custom_components/shinobi/component/api/api.py @@ -286,7 +286,9 @@ async def login(self): if key_uid is not None and key_uid == uid: self.data[API_DATA_API_KEY] = key.get("code") - self.data[API_DATA_DAYS] = int(float(user_details.get(API_DATA_DAYS, 10))) + days = user_details.get(API_DATA_DAYS) + + self.data[API_DATA_DAYS] = 10 if days is None or days == "" else int(float(days)) await self._set_socket_io_version() diff --git a/custom_components/shinobi/manifest.json b/custom_components/shinobi/manifest.json index 4869c76..3641402 100644 --- a/custom_components/shinobi/manifest.json +++ b/custom_components/shinobi/manifest.json @@ -11,6 +11,6 @@ "codeowners": ["@elad-bar"], "requirements": [ ], "config_flow": true, - "version": "2.0.26", + "version": "2.0.27", "iot_class": "local_polling" }