Skip to content

Commit

Permalink
Migrate Axis, deCONZ and UniFi to use config entry subclass (#26173)
Browse files Browse the repository at this point in the history
* Use init_subclass for Config Entries

* Pylint cant handle subclass being the only user of imports
  • Loading branch information
Kane610 authored Sep 1, 2019
1 parent a80d26f commit 6102eb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions homeassistant/components/axis/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def configured_devices(hass):
}


@config_entries.HANDLERS.register(DOMAIN)
class AxisFlowHandler(config_entries.ConfigFlow):
class AxisFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a Axis config flow."""

VERSION = 1
Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/deconz/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ def get_master_gateway(hass):
return gateway


@config_entries.HANDLERS.register(DOMAIN)
class DeconzFlowHandler(config_entries.ConfigFlow):
class DeconzFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a deCONZ config flow."""

VERSION = 1
Expand Down
5 changes: 2 additions & 3 deletions homeassistant/components/unifi/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
CONF_VERIFY_SSL,
)

from .const import (
from .const import ( # pylint: disable=unused-import
CONF_CONTROLLER,
CONF_TRACK_CLIENTS,
CONF_TRACK_DEVICES,
Expand All @@ -33,8 +33,7 @@
DEFAULT_VERIFY_SSL = False


@config_entries.HANDLERS.register(DOMAIN)
class UnifiFlowHandler(config_entries.ConfigFlow):
class UnifiFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a UniFi config flow."""

VERSION = 1
Expand Down

0 comments on commit 6102eb9

Please sign in to comment.