Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复因为windDirectionVertical不存在导致的climate实体不可用的问题 #163

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

pangjian
Copy link
Contributor

@pangjian pangjian commented Jul 5, 2024

haier的中央空调climate实体不可用,查看报错日志为

Traceback (most recent call last):
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/haier/entity.py", line 74, in data_callback
self._update_value()
File "/config/custom_components/haier/climate.py", line 91, in updatevalue
wind_direction_vertical = int(self._get_wind_direction_vertical())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/haier/climate.py", line 189, in getwind_direction_vertical
return self._attributes_data['windDirectionVertical']
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'windDirectionVertical'

应该就是因为windDirectionVertical不存在导致的,修改了代码兼容了这种不存在的场景。

@banto6 banto6 merged commit 00b515e into banto6:master Jul 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants