fix: fix miot cloud and mdns error (#637)

* fix: fix miot cloud state error

* style: code format
This commit is contained in:
Paul Shawn 2025-01-13 11:23:53 +08:00 committed by GitHub
parent 045528fbf2
commit 3b89536bda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ class MIoTOauthClient:
@property
def state(self) -> str:
return self.state
return self._state
async def deinit_async(self) -> None:
if self._session and not self._session.closed:

View File

@ -117,7 +117,7 @@ class MipsServiceData:
self.type = service_info.type
self.server = service_info.server or ''
# Parse profile
self.did = str(int.from_bytes(self.profile_bin[1:9]))
self.did = str(int.from_bytes(self.profile_bin[1:9], byteorder='big'))
self.group_id = binascii.hexlify(
self.profile_bin[9:17][::-1]).decode('utf-8')
self.role = int(self.profile_bin[20] >> 4)