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

Fix fan_modes in tuya climate #30942

Merged
merged 1 commit into from Jan 22, 2020

Conversation

springstan
Copy link
Member

Description:

  • TuyaClimate does not have a method called fan_modes() instead it is named fan_list()
  • fixes the following error:
2020-01-02 11:05:21 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 286, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 229, in state_attributes
    data[ATTR_FAN_MODES] = self.fan_modes
  File "/usr/src/homeassistant/homeassistant/components/tuya/climate.py", line 123, in fan_modes
    return self.tuya.fan_modes()
AttributeError: 'TuyaClimate' object has no attribute 'fan_modes'

Related issue (if applicable): fixes #30382

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MartinHjelmare MartinHjelmare merged commit c388833 into home-assistant:dev Jan 22, 2020
@lock lock bot locked and limited conversation to collaborators Jan 24, 2020
@springstan springstan deleted the fix-tuya-fan-modes branch April 7, 2020 14:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'TuyaClimate' object has no attribute 'fan_modes'
3 participants