mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-08 00:14:31 +02:00
changed config_entries import
added connection class
This commit is contained in:
parent
619871a719
commit
c58184b0f7
1 changed files with 11 additions and 3 deletions
|
@ -2,8 +2,12 @@
|
|||
|
||||
import logging
|
||||
import voluptuous as vol
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.config_entries import (
|
||||
CONN_CLASS_LOCAL_POLL,
|
||||
ConfigFlow,
|
||||
OptionsFlow,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
CONF_HOST,
|
||||
|
@ -40,8 +44,12 @@ def configured_instances(hass):
|
|||
# ---------------------------
|
||||
# MikrotikControllerConfigFlow
|
||||
# ---------------------------
|
||||
class MikrotikControllerConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
class MikrotikControllerConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
"""MikrotikControllerConfigFlow class"""
|
||||
|
||||
VERSION = 1
|
||||
CONNECTION_CLASS = CONN_CLASS_LOCAL_POLL
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize MikrotikControllerConfigFlow."""
|
||||
return
|
||||
|
@ -118,7 +126,7 @@ class MikrotikControllerConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
# ---------------------------
|
||||
# MikrotikControllerOptionsFlowHandler
|
||||
# ---------------------------
|
||||
class MikrotikControllerOptionsFlowHandler(config_entries.OptionsFlow):
|
||||
class MikrotikControllerOptionsFlowHandler(OptionsFlow):
|
||||
"""Handle options."""
|
||||
|
||||
def __init__(self, config_entry):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue