fix: tofan.airrtc.wk01 thermostat and air conditioner service (#1160)
Some checks failed
Tests / check-rule-format (push) Failing after 5s
Validate / validate-hassfest (push) Failing after 6s
Validate / validate-hacs (push) Failing after 12s
Validate / validate-lint (push) Failing after 5s
Validate / validate-setup (push) Failing after 7s

This commit is contained in:
Li Shuzhen
2025-06-19 17:07:31 +08:00
committed by GitHub
parent 5179e97e38
commit 028399c0b1
4 changed files with 179 additions and 2 deletions

View File

@ -629,11 +629,14 @@ class MIoTClient:
mips = self._mips_local.get(device_gw['group_id'], None)
if mips is None:
_LOGGER.error(
'no gw route, %s, try control through cloud',
'no gateway route, %s, try control through cloud',
device_gw)
else:
result = await mips.set_prop_async(
did=did, siid=siid, piid=piid, value=value)
_LOGGER.debug(
'gateway set prop, %s.%d.%d, %s -> %s',
did, siid, piid, value, result)
rc = (result or {}).get(
'code', MIoTErrorCode.CODE_MIPS_INVALID_RESULT.value)
if rc in [0, 1]:
@ -663,7 +666,7 @@ class MIoTClient:
{'did': did, 'siid': siid, 'piid': piid, 'value': value}
])
_LOGGER.debug(
'set prop response, %s.%d.%d, %s, result, %s',
'cloud set prop, %s.%d.%d, %s -> %s',
did, siid, piid, value, result)
if result and len(result) == 1:
rc = result[0].get(