mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-02 21:44:31 +02:00
Added SSL Verify option
This commit is contained in:
parent
955fa33bca
commit
8e68931e57
6 changed files with 34 additions and 10 deletions
|
@ -26,6 +26,7 @@ from homeassistant.const import (
|
|||
CONF_USERNAME,
|
||||
CONF_PASSWORD,
|
||||
CONF_SSL,
|
||||
CONF_VERIFY_SSL,
|
||||
CONF_ZONE,
|
||||
STATE_HOME,
|
||||
)
|
||||
|
@ -130,6 +131,7 @@ class MikrotikTrackerCoordinator(DataUpdateCoordinator[None]):
|
|||
config_entry.data[CONF_PASSWORD],
|
||||
config_entry.data[CONF_PORT],
|
||||
config_entry.data[CONF_SSL],
|
||||
config_entry.data[CONF_VERIFY_SSL],
|
||||
)
|
||||
|
||||
# ---------------------------
|
||||
|
@ -271,6 +273,7 @@ class MikrotikCoordinator(DataUpdateCoordinator[None]):
|
|||
config_entry.data[CONF_PASSWORD],
|
||||
config_entry.data[CONF_PORT],
|
||||
config_entry.data[CONF_SSL],
|
||||
config_entry.data[CONF_VERIFY_SSL],
|
||||
)
|
||||
|
||||
self.debug = False
|
||||
|
@ -1584,7 +1587,7 @@ class MikrotikCoordinator(DataUpdateCoordinator[None]):
|
|||
try:
|
||||
full_version = self.ds["fw-update"].get("installed-version")
|
||||
split_end = min(len(full_version), 4)
|
||||
version = re.sub(r"[^0-9\.]", "", full_version[0:split_end])
|
||||
version = re.sub("[^0-9\.]", "", full_version[0:split_end])
|
||||
self.major_fw_version = int(version.split(".")[0])
|
||||
self.minor_fw_version = int(version.split(".")[1])
|
||||
_LOGGER.debug(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue