mirror of
				https://github.com/XiaoMi/ha_xiaomi_home.git
				synced 2025-10-31 09:22:08 +08:00 
			
		
		
		
	fix: fix miot cloud and mdns error (#637)
* fix: fix miot cloud state error * style: code format
This commit is contained in:
		| @@ -106,7 +106,7 @@ class MIoTOauthClient: | |||||||
|  |  | ||||||
|     @property |     @property | ||||||
|     def state(self) -> str: |     def state(self) -> str: | ||||||
|         return self.state |         return self._state | ||||||
|  |  | ||||||
|     async def deinit_async(self) -> None: |     async def deinit_async(self) -> None: | ||||||
|         if self._session and not self._session.closed: |         if self._session and not self._session.closed: | ||||||
|   | |||||||
| @@ -117,7 +117,7 @@ class MipsServiceData: | |||||||
|         self.type = service_info.type |         self.type = service_info.type | ||||||
|         self.server = service_info.server or '' |         self.server = service_info.server or '' | ||||||
|         # Parse profile |         # 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.group_id = binascii.hexlify( | ||||||
|             self.profile_bin[9:17][::-1]).decode('utf-8') |             self.profile_bin[9:17][::-1]).decode('utf-8') | ||||||
|         self.role = int(self.profile_bin[20] >> 4) |         self.role = int(self.profile_bin[20] >> 4) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user