Migrate Axis, deCONZ and UniFi to use config entry subclass (#26173)

* Use init_subclass for Config Entries

* Pylint cant handle subclass being the only user of imports
This commit is contained in:
Robert Svensson 2019-09-01 13:15:48 +02:00 committed by GitHub
parent a80d26f0dc
commit 6102eb9f1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -11,7 +11,7 @@ from homeassistant.const import (
CONF_VERIFY_SSL,
)
from .const import (
from .const import ( # pylint: disable=unused-import
CONF_CONTROLLER,
CONF_TRACK_CLIENTS,
CONF_TRACK_DEVICES,
@ -33,8 +33,7 @@ DEFAULT_SITE_ID = "default"
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