From a87e8139a7cf4081b6f7c94bf91f0d384ba4c621 Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 18 Feb 2021 09:53:30 +0300 Subject: [PATCH] fix bugs --- custom_components/mega/entities.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/mega/entities.py b/custom_components/mega/entities.py index 20866f8..87d23aa 100644 --- a/custom_components/mega/entities.py +++ b/custom_components/mega/entities.py @@ -48,6 +48,8 @@ class BaseMegaEntity(CoordinatorEntity, RestoreEntity): index=None, ): super().__init__(mega.updater) + + self.http_cmd = http_cmd if self.http_cmd == 'ds2413': self.mega.ds2413_ports |= {self.port} self._state: State = None @@ -62,7 +64,6 @@ class BaseMegaEntity(CoordinatorEntity, RestoreEntity): self._name = name or f"{mega.id}_{port}" + \ (f"_{id_suffix}" if id_suffix else "") self._customize: dict = None - self.http_cmd = http_cmd self.index = index self.addr = addr