Bump aioshelly library to version 0.3.3 (#40415)

This commit is contained in:
Maciej Bieniek authored and GitHub committed 2020-09-26 22:39:02 +02:00
1 parent 8837ed35cd
commit b8f837365c
6 files changed
+42 -16

No files matched your search

@@ -62,6 +62,8 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
info = await self._async_get_info(host)
except HTTP_CONNECT_ERRORS:
errors["base"] = "cannot_connect"
except aioshelly.FirmwareUnsupported:
return self.async_abort(reason="unsupported_firmware")
except Exception: # pylint: disable=broad-except
_LOGGER.exception("Unexpected exception")
errors["base"] = "unknown"
@@ -133,6 +135,8 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self.info = info = await self._async_get_info(zeroconf_info["host"])
except HTTP_CONNECT_ERRORS:
return self.async_abort(reason="cannot_connect")
except aioshelly.FirmwareUnsupported:
return self.async_abort(reason="unsupported_firmware")
await self.async_set_unique_id(info["mac"])
self._abort_if_unique_id_configured({CONF_HOST: zeroconf_info["host"]})
@@ -3,7 +3,7 @@
"name": "Shelly",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/shelly",
"requirements": ["aioshelly==0.3.2"],
"requirements": ["aioshelly==0.3.3"],
"zeroconf": [{"type": "_http._tcp.local.", "name":"shelly*"}],
"codeowners": ["@balloob", "@bieniu"]
}
+2 -1
View File
@@ -24,7 +24,8 @@
"unknown": "[%key:common::config_flow::error::unknown%]"
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"unsupported_firmware": "The device is using an unsupported firmware version."
}
}
}