mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-08 16:34:28 +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 logging
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
from homeassistant import config_entries
|
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
|
from homeassistant.config_entries import (
|
||||||
|
CONN_CLASS_LOCAL_POLL,
|
||||||
|
ConfigFlow,
|
||||||
|
OptionsFlow,
|
||||||
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
CONF_HOST,
|
CONF_HOST,
|
||||||
|
@ -40,8 +44,12 @@ def configured_instances(hass):
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# MikrotikControllerConfigFlow
|
# MikrotikControllerConfigFlow
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
class MikrotikControllerConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
class MikrotikControllerConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||||
"""MikrotikControllerConfigFlow class"""
|
"""MikrotikControllerConfigFlow class"""
|
||||||
|
|
||||||
|
VERSION = 1
|
||||||
|
CONNECTION_CLASS = CONN_CLASS_LOCAL_POLL
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Initialize MikrotikControllerConfigFlow."""
|
"""Initialize MikrotikControllerConfigFlow."""
|
||||||
return
|
return
|
||||||
|
@ -118,7 +126,7 @@ class MikrotikControllerConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# MikrotikControllerOptionsFlowHandler
|
# MikrotikControllerOptionsFlowHandler
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
class MikrotikControllerOptionsFlowHandler(config_entries.OptionsFlow):
|
class MikrotikControllerOptionsFlowHandler(OptionsFlow):
|
||||||
"""Handle options."""
|
"""Handle options."""
|
||||||
|
|
||||||
def __init__(self, config_entry):
|
def __init__(self, config_entry):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue