mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-18 01:34:24 +02:00
Merged System category
Added Visit Device URL
This commit is contained in:
parent
74a4a367dd
commit
448483da22
3 changed files with 31 additions and 3 deletions
|
@ -5,6 +5,12 @@ import voluptuous as vol
|
|||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.exceptions import ConfigEntryNotReady
|
||||
|
||||
from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
CONF_HOST,
|
||||
)
|
||||
|
||||
from .const import (
|
||||
DOMAIN,
|
||||
DATA_CLIENT,
|
||||
|
@ -71,8 +77,16 @@ async def async_setup_entry(hass, config_entry):
|
|||
connections={(DOMAIN, controller.data["routerboard"]["serial-number"])},
|
||||
manufacturer=controller.data["resource"]["platform"],
|
||||
model=controller.data["routerboard"]["model"],
|
||||
name=controller.data["routerboard"]["model"],
|
||||
name=f"{config_entry.data[CONF_NAME]} {controller.data['routerboard']['model']}",
|
||||
sw_version=controller.data["resource"]["version"],
|
||||
configuration_url=f"http://{config_entry.data[CONF_HOST]}",
|
||||
identifiers={
|
||||
DOMAIN,
|
||||
"serial-number",
|
||||
controller.data["routerboard"]["serial-number"],
|
||||
"sensor",
|
||||
f"{config_entry.data[CONF_NAME]} {controller.data['routerboard']['model']}",
|
||||
}
|
||||
)
|
||||
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue