mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-23 01:08:55 +02:00
parent
744b338df4
commit
2afb0c5ab3
4 changed files with 45 additions and 1 deletions
|
@ -39,6 +39,10 @@ from .const import (
|
|||
DEFAULT_SENSOR_NAT,
|
||||
CONF_SENSOR_MANGLE,
|
||||
DEFAULT_SENSOR_MANGLE,
|
||||
CONF_SENSOR_KIDCONTROL,
|
||||
DEFAULT_SENSOR_KIDCONTROL,
|
||||
CONF_SENSOR_PPP,
|
||||
DEFAULT_SENSOR_PPP,
|
||||
CONF_SENSOR_SCRIPTS,
|
||||
DEFAULT_SENSOR_SCRIPTS,
|
||||
CONF_SENSOR_ENVIRONMENT,
|
||||
|
@ -257,6 +261,18 @@ class MikrotikControllerOptionsFlowHandler(OptionsFlow):
|
|||
CONF_SENSOR_MANGLE, DEFAULT_SENSOR_MANGLE
|
||||
),
|
||||
): bool,
|
||||
# vol.Optional(
|
||||
# CONF_SENSOR_KIDCONTROL,
|
||||
# default=self.config_entry.options.get(
|
||||
# CONF_SENSOR_KIDCONTROL, DEFAULT_SENSOR_KIDCONTROL
|
||||
# ),
|
||||
# ): bool,
|
||||
vol.Optional(
|
||||
CONF_SENSOR_PPP,
|
||||
default=self.config_entry.options.get(
|
||||
CONF_SENSOR_PPP, DEFAULT_SENSOR_PPP
|
||||
),
|
||||
): bool,
|
||||
vol.Optional(
|
||||
CONF_SENSOR_SCRIPTS,
|
||||
default=self.config_entry.options.get(
|
||||
|
|
|
@ -40,6 +40,10 @@ CONF_SENSOR_NAT = "sensor_nat"
|
|||
DEFAULT_SENSOR_NAT = False
|
||||
CONF_SENSOR_MANGLE = "sensor_mangle"
|
||||
DEFAULT_SENSOR_MANGLE = False
|
||||
CONF_SENSOR_PPP = "sensor_ppp"
|
||||
DEFAULT_SENSOR_PPP = False
|
||||
CONF_SENSOR_KIDCONTROL = "sensor_kidcontrol"
|
||||
DEFAULT_SENSOR_KIDCONTROL = False
|
||||
CONF_SENSOR_SCRIPTS = "sensor_scripts"
|
||||
DEFAULT_SENSOR_SCRIPTS = False
|
||||
CONF_SENSOR_ENVIRONMENT = "sensor_environment"
|
||||
|
|
|
@ -42,6 +42,10 @@ from .const import (
|
|||
DEFAULT_SENSOR_NAT,
|
||||
CONF_SENSOR_MANGLE,
|
||||
DEFAULT_SENSOR_MANGLE,
|
||||
CONF_SENSOR_KIDCONTROL,
|
||||
DEFAULT_SENSOR_KIDCONTROL,
|
||||
CONF_SENSOR_PPP,
|
||||
DEFAULT_SENSOR_PPP,
|
||||
CONF_SENSOR_SCRIPTS,
|
||||
DEFAULT_SENSOR_SCRIPTS,
|
||||
CONF_SENSOR_ENVIRONMENT,
|
||||
|
@ -197,13 +201,31 @@ class MikrotikControllerData:
|
|||
return self.config_entry.options.get(CONF_SENSOR_NAT, DEFAULT_SENSOR_NAT)
|
||||
|
||||
# ---------------------------
|
||||
# option_sensor_nat
|
||||
# option_sensor_mangle
|
||||
# ---------------------------
|
||||
@property
|
||||
def option_sensor_mangle(self):
|
||||
"""Config entry option to not track ARP."""
|
||||
return self.config_entry.options.get(CONF_SENSOR_MANGLE, DEFAULT_SENSOR_MANGLE)
|
||||
|
||||
# ---------------------------
|
||||
# option_sensor_kidcontrol
|
||||
# ---------------------------
|
||||
@property
|
||||
def option_sensor_kidcontrol(self):
|
||||
"""Config entry option to not track ARP."""
|
||||
return self.config_entry.options.get(
|
||||
CONF_SENSOR_KIDCONTROL, DEFAULT_SENSOR_KIDCONTROL
|
||||
)
|
||||
|
||||
# ---------------------------
|
||||
# option_sensor_ppp
|
||||
# ---------------------------
|
||||
@property
|
||||
def option_sensor_ppp(self):
|
||||
"""Config entry option to not track ARP."""
|
||||
return self.config_entry.options.get(CONF_SENSOR_PPP, DEFAULT_SENSOR_PPP)
|
||||
|
||||
# ---------------------------
|
||||
# option_sensor_scripts
|
||||
# ---------------------------
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
"sensor_simple_queues": "Simple queues switches",
|
||||
"sensor_nat": "NAT switches",
|
||||
"sensor_mangle": "Mangle switches",
|
||||
"sensor_kidcontrol": "Kid control",
|
||||
"sensor_ppp": "PPP users",
|
||||
"sensor_scripts": "Scripts switches",
|
||||
"sensor_environment": "Environment variable sensors"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue