diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a04b218 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "*.yaml": "home-assistant" + } +} \ No newline at end of file diff --git a/custom_components/grocy/config_flow.py b/custom_components/grocy/config_flow.py index 32174b4..bb96f59 100644 --- a/custom_components/grocy/config_flow.py +++ b/custom_components/grocy/config_flow.py @@ -86,7 +86,7 @@ async def _test_credentials(self, url, api_key, port, verify_ssl): """Return true if credentials is valid.""" try: client = Grocy(url, api_key, port, verify_ssl) - client.stock() + await self.hass.async_add_executor_job(client.stock) return True except Exception as e: # pylint: disable=broad-except _LOGGER.exception(e) diff --git a/custom_components/grocy/manifest.json b/custom_components/grocy/manifest.json index a6ac1bb..37515f7 100644 --- a/custom_components/grocy/manifest.json +++ b/custom_components/grocy/manifest.json @@ -4,6 +4,13 @@ "documentation": "https://github.com/custom-components/grocy", "dependencies": [], "config_flow": true, - "codeowners": ["@SebRut", "@isabellaalstrom"], - "requirements": ["pygrocy==0.16.0", "iso8601==0.1.12", "integrationhelper"] -} + "codeowners": [ + "@SebRut", + "@isabellaalstrom" + ], + "requirements": [ + "pygrocy==0.17.0", + "iso8601==0.1.12", + "integrationhelper" + ] +} \ No newline at end of file