冷氣控制會不定時失效,需要重啟HA才能恢復正常
🐛 Describe the bug
冷氣控制會不定時失效,第一次發生在8月28日,第二次發生於9月20日,當失效時,點擊HA控制面板改變溫度會產生下列錯誤訊息: 執行觸發動作climate/set_temperature失敗。 'NoneType' object has no attribute 'expiration'
重啟HA後恢復正常連線。
Log files:
2024-09-20 00:29:12.073 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139983014449872] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 951, in async_service_temperature_set await entity.async_set_temperature(**kwargs) File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 726, in async_set_temperature await self.hass.async_add_executor_job( File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/jcihitachi_tw/climate.py", line 421, in set_temperature self.update() File "/config/custom_components/jcihitachi_tw/init.py", line 232, in update result = api.set_status(**vars(data)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/JciHitachi/api.py", line 1293, in set_status self._check_before_publish() File "/usr/local/lib/python3.12/site-packages/JciHitachi/api.py", line 953, in _check_before_publish if self._aws_tokens.expiration - current_time <= 300: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'expiration'
home-assistant error.log home-assistant_jcihitachi_tw_2024-09-19T16-52-13.034Z.log
Environment Information
HA version = 2024.8.2 JciHitachi TW = 1.8.0
I think there might be a race condition between api.login and api.set_status. The upper part of the error log was truncated so I couldn't know what was going on. I would say if you're using any automation with your Hitachi devices, disable it for a few days and see if the issue is gone.
This bug started emerging a few months ago due to some internal changes in recent HA core updates. We would accept a PR that fixes it.
I've also encountered this issue The way to fix it is to delete the integration and add it back I think it has to with the Hitachi login expiring It would be great if there is auto re-login / re-login button
應該是登入資訊過期 刪掉重新登入就好了
建議可以加入自動重登 / 重登按鈕
上週又發生相同問題,我都是直接重新啟動HA,就能恢復正常運作。
Michael Huang @.***>於 2024年10月21日 週一,08:04寫道:
I've also encountered this issue The way to fix it is to delete the integration and add it back I think it has to with the Hitachi login expiring It would be great if there is auto re-login / re-login button
應該是登入資訊過期 重新刪掉重登入就好了
建議可以加入自動重登 / 重登按鈕
— Reply to this email directly, view it on GitHub https://github.com/qqaatw/JciHitachiHA/issues/89#issuecomment-2425304957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEV4NDLW2EV6BCDFLNQYJG3Z4RAHTAVCNFSM6AAAAABOQLEYUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRVGMYDIOJVG4 . You are receiving this because you authored the thread.Message ID: @.***>
If anyone finds the root cause and knows how to fix it, don't hesitate to send us a PR.
Wonder if there is a fix for this. Keep prompting this error (執行觸發動作humidifier/turn_off失敗。 'NoneType' object has no attribute 'expiration')
我都新增成功,也橋接到HOMEKIT,但一下子重啟又會一直--執行觸發動作...失敗---
This issue shouldn't be too hard to fix, and we always welcome everyone to contribute and even become a collaborator that manages the project with me - #83.
As I don't live in Taiwan, I honestly don't have incentive & time to look into it. I'm going to lock the conversation, and people who have a fix please propose a PR to LibJciHitachi project.
Shall be fixed with the latest release.