mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-08-04 01:44:30 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9711006f29
2 changed files with 8 additions and 3 deletions
|
@ -43,9 +43,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
class MikrotikRouterOSUpdate(MikrotikEntity, UpdateEntity):
|
||||
"""Define an Mikrotik Controller Update entity."""
|
||||
|
||||
TYPE = DEVICE_UPDATE
|
||||
_attr_device_class = UpdateDeviceClass.FIRMWARE
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
inst,
|
||||
|
@ -59,6 +56,7 @@ class MikrotikRouterOSUpdate(MikrotikEntity, UpdateEntity):
|
|||
self._attr_supported_features = UpdateEntityFeature.INSTALL
|
||||
self._attr_supported_features |= UpdateEntityFeature.BACKUP
|
||||
self._attr_supported_features |= UpdateEntityFeature.RELEASE_NOTES
|
||||
self._attr_title = self.entity_description.title
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
|
@ -113,6 +111,9 @@ class MikrotikRouterOSUpdate(MikrotikEntity, UpdateEntity):
|
|||
class MikrotikRouterBoardFWUpdate(MikrotikEntity, UpdateEntity):
|
||||
"""Define an Mikrotik Controller Update entity."""
|
||||
|
||||
TYPE = DEVICE_UPDATE
|
||||
_attr_device_class = UpdateDeviceClass.FIRMWARE
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
inst,
|
||||
|
@ -124,6 +125,7 @@ class MikrotikRouterBoardFWUpdate(MikrotikEntity, UpdateEntity):
|
|||
super().__init__(inst, uid, mikrotik_controller, entity_description)
|
||||
|
||||
self._attr_supported_features = UpdateEntityFeature.INSTALL
|
||||
self._attr_title = self.entity_description.title
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
|
|
|
@ -11,6 +11,7 @@ class MikrotikUpdateEntityDescription(UpdateEntityDescription):
|
|||
ha_group: str = ""
|
||||
ha_connection: str = ""
|
||||
ha_connection_value: str = ""
|
||||
title: str = ""
|
||||
data_path: str = ""
|
||||
data_attribute: str = "available"
|
||||
data_name: str = ""
|
||||
|
@ -26,6 +27,7 @@ SENSOR_TYPES = {
|
|||
key="system_rosupdate",
|
||||
name="RouterOS update",
|
||||
ha_group="System",
|
||||
title="Mikrotik RouterOS",
|
||||
data_path="fw-update",
|
||||
data_name="",
|
||||
data_uid="",
|
||||
|
@ -36,6 +38,7 @@ SENSOR_TYPES = {
|
|||
key="system_rbfwupdate",
|
||||
name="RouterBoard firmware update",
|
||||
ha_group="System",
|
||||
title="Mikrotik RouterBoard",
|
||||
data_path="routerboard",
|
||||
data_attribute="current-firmware",
|
||||
data_name="",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue