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

Add swing mode of a Chigo Air Conditioner #518

Closed
vaguecupid opened this issue Jun 6, 2019 · 7 comments · Fixed by #519
Closed

Add swing mode of a Chigo Air Conditioner #518

vaguecupid opened this issue Jun 6, 2019 · 7 comments · Fixed by #519
Assignees

Comments

@vaguecupid
Copy link

vaguecupid commented Jun 6, 2019

I have three xiaomi airconditioningcompanion, but one of them can't use after turning on the air conditioner. The error code is:

2019-06-07 02:01:31 ERROR (MainThread) [homeassistant.components.climate] xiaomi_miio_airconditioningcompanion: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 375, in async_device_update
await self.async_update()
File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 276, in async_update
ATTR_SWING_MODE: state.swing_mode.name.lower(),
File "/usr/local/lib/python3.7/site-packages/miio/airconditioningcompanion.py", line 215, in swing_mode
mode = int(self.state[5:6])
ValueError: invalid literal for int() with base 10: 'C'

@syssi
Copy link
Collaborator

syssi commented Jun 6, 2019

Do you own different air conditions? Does the problematic one support special swing modes?

@vaguecupid
Copy link
Author

Do you own different air conditions? Does the problematic one support special swing modes?

I saw from the app, there is no difference between this and other in swing mode ,only on and off. Three air conditioners are of different brands(Panasonic,Midea,Chigo),The brand with problems is Chigo,

@syssi
Copy link
Collaborator

syssi commented Jun 6, 2019

If you change the swing mode does the error change, too?

@vaguecupid
Copy link
Author

yes, I turn off the swing mode, and then restart hassio, the error code is:

019-06-07 03:38:00 ERROR (MainThread) [homeassistant.components.climate] xiaomi_miio_airconditioningcompanion: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 375, in async_device_update
await self.async_update()
File "/config/custom_components/xiaomi_miio_airconditioningcompanion/climate.py", line 276, in async_update
ATTR_SWING_MODE: state.swing_mode.name.lower(),
File "/usr/local/lib/python3.7/site-packages/miio/airconditioningcompanion.py", line 215, in swing_mode
mode = int(self.state[5:6])
ValueError: invalid literal for int() with base 10: 'D'

@syssi
Copy link
Collaborator

syssi commented Jun 6, 2019

Could you provide the output of the status commands? I'm interested in the value of air_condition_model (of the chigo).

@syssi syssi changed the title how to resolve the error of airconditioningcompanion Add swing mode of a Chigo Air Conditioner Jun 6, 2019
@syssi syssi self-assigned this Jun 6, 2019
@vaguecupid
Copy link
Author

Thanks, The airconditioningcompanion can work perfectly

@syssi
Copy link
Collaborator

syssi commented Jun 7, 2019

Could you provide the air_condition_model string nevertheless? It's important to improve the implementation.

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 a pull request may close this issue.

2 participants