Skip to content

Commit

Permalink
Patch Update
Browse files Browse the repository at this point in the history
  • Loading branch information
lunDreame authored Jan 18, 2025
1 parent cd51a5a commit a9fbf13
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion custom_components/bestin/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

DOMAIN = "bestin"
NAME = "BESTIN"
VERSION = "1.1.8"
VERSION = "1.1.9"

PLATFORMS: list[Platform] = [
Platform.CLIMATE,
Expand Down
4 changes: 3 additions & 1 deletion custom_components/bestin/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ def parse_state_general(self, packet: bytearray) -> tuple[dict, int]:

for i in range(iterations[0]):
light_state = bool(packet[6] & (0x01 << i))
dc_value = int.from_bytes(packet[12:14], 'big') / 10.0
state_general["light"][str(i)] = light_state
state_general["light"][f"dcvalue"] = dc_value

for i in range(iterations[1]):
idx = 14 + 2 * i
Expand Down Expand Up @@ -719,6 +721,6 @@ async def process_queue_data(self):
queue_item = await self.queue.get()
await self.handle_packet_queue(queue_item)
else:
await asyncio.sleep(1e-3)
await asyncio.sleep(0.1)
except Exception as ex:
LOGGER.error(f"Failed to process task queue: {ex}", exc_info=True)
4 changes: 2 additions & 2 deletions custom_components/bestin/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ def device_info(self) -> DeviceInfo:

return DeviceInfo(
connections={(self.hub.hub_id, self.unique_id)},
identifiers={(DOMAIN, f"{self.hub.wp_version}_{formatted_id}_{self.hub.hub_id}")},
identifiers={(DOMAIN, f"{self.hub.wp_version}_{formatted_id}")},
manufacturer="HDC Labs Co., Ltd.",
model=self.hub.wp_version,
name=device_name,
sw_version=self.hub.sw_version,
via_device=(DOMAIN, self.hub.hub_id),
via_device=(DOMAIN, str(self.hub.hub_id)),
)


Expand Down
2 changes: 1 addition & 1 deletion custom_components/bestin/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"aiofiles",
"xmltodict"
],
"version": "1.1.8"
"version": "1.1.9"
}

0 comments on commit a9fbf13

Please sign in to comment.