mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-11 17:14:28 +05:00
fix bugs
This commit is contained in:
@@ -48,6 +48,8 @@ class BaseMegaEntity(CoordinatorEntity, RestoreEntity):
|
|||||||
index=None,
|
index=None,
|
||||||
):
|
):
|
||||||
super().__init__(mega.updater)
|
super().__init__(mega.updater)
|
||||||
|
|
||||||
|
self.http_cmd = http_cmd
|
||||||
if self.http_cmd == 'ds2413':
|
if self.http_cmd == 'ds2413':
|
||||||
self.mega.ds2413_ports |= {self.port}
|
self.mega.ds2413_ports |= {self.port}
|
||||||
self._state: State = None
|
self._state: State = None
|
||||||
@@ -62,7 +64,6 @@ class BaseMegaEntity(CoordinatorEntity, RestoreEntity):
|
|||||||
self._name = name or f"{mega.id}_{port}" + \
|
self._name = name or f"{mega.id}_{port}" + \
|
||||||
(f"_{id_suffix}" if id_suffix else "")
|
(f"_{id_suffix}" if id_suffix else "")
|
||||||
self._customize: dict = None
|
self._customize: dict = None
|
||||||
self.http_cmd = http_cmd
|
|
||||||
self.index = index
|
self.index = index
|
||||||
self.addr = addr
|
self.addr = addr
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user