Skip to content

Commit

Permalink
Fix extraction of days to keep video files when settings were not cha…
Browse files Browse the repository at this point in the history
…nged (default)
  • Loading branch information
elad-bar committed Nov 28, 2022
1 parent 3fc18e6 commit efb77fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion custom_components/shinobi/component/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion custom_components/shinobi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"codeowners": ["@elad-bar"],
"requirements": [ ],
"config_flow": true,
"version": "2.0.26",
"version": "2.0.27",
"iot_class": "local_polling"
}

0 comments on commit efb77fe

Please sign in to comment.