Axis - Streamline setup and teardown of integration (#35675)

* Streamline setup and teardown of integration

* Dont remove integration twice
This commit is contained in:
Robert Svensson 2020-05-15 23:56:09 +02:00 committed by GitHub
parent 890013cecf
commit 714047f789
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 51 deletions

View file

@ -32,6 +32,9 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
device = hass.data[AXIS_DOMAIN][config_entry.unique_id]
if not device.option_camera:
return
config = {
CONF_NAME: config_entry.data[CONF_NAME],
CONF_USERNAME: config_entry.data[CONF_USERNAME],