core: BOND fan control errors
The problem
The BOND fan integration is generating errors when I try to turn fans on/off. I am using fans with on/off toggle control and speed increase / speed decrease remotes. Also the fan speed increase/decrease control did not transfer over from the BOND application. In the Bond app I have a fan power toggle button and a fan speed increase and fan decrease button, but these did not show up in the HA bond integration for these fans.
Environment
I am using Home Assistant 0.113.1
- Home Assistant Core release with the issue:
- Last working Home Assistant Core release (if known):
- Operating environment (OS/Container/Supervised/Core):
- Integration causing this issue:
- Link to integration documentation on our website:
Problem-relevant configuration.yaml
Traceback/Error logs
Logger: homeassistant.core Source: components/bond/fan.py:79 First occurred: 6:44:23 PM (7 occurrences) Last logged: 6:57:40 PM
Error executing service: <ServiceCall fan.turn_on (c:02e523d448524fcfb8534672640c34f2): entity_id=[‘fan.fan’]> Error executing service: <ServiceCall fan.turn_on (c:20c6aa9fbc36416b93fee2a3a431ef84): entity_id=[‘fan.fan’]> Error executing service: <ServiceCall fan.turn_on (c:8b1e973328f449c7a90c27556113f122): entity_id=[‘fan.fan’]> Error executing service: <ServiceCall fan.turn_on (c:83817aca048048d59fee44e5a2083edf): entity_id=[‘fan.fan’]> Error executing service: <ServiceCall fan.turn_on (c:57b542fa44f1434f8005b0e211b64989): entity_id=[‘fan.fan’]> Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/core.py”, line 1281, in catch_exceptions await coro_or_task File “/usr/src/homeassistant/homeassistant/core.py”, line 1300, in _execute_service await handler.func(service_call) File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 208, in handle_service await self.hass.helpers.service.entity_service_call( File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 471, in entity_service_call future.result() # pop exception if have File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 277, in async_update_ha_state self._async_write_ha_state() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 314, in _async_write_ha_state sstate = self.state File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 607, in state return STATE_ON if self.is_on else STATE_OFF File “/usr/src/homeassistant/homeassistant/components/fan/init.py”, line 146, in is_on return self.speed not in [SPEED_OFF, None] File “/usr/src/homeassistant/homeassistant/components/bond/fan.py”, line 79, in speed return self.speed_list[ha_speed] IndexError: list index out of range
Additional information
Thanks in advance for your help.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (13 by maintainers)
@marciogranzotto , I will do that after work and put up the results.
@tetragram55 https://github.com/home-assistant/core/pull/38382 should fix exceptions in the log. As for increase/decrease controls not transferring to HA - I don’t think HA has this concept for fans, I don’t think this can be done.
@marciogranzotto I will give it a try again tonight, thanks for the help.
@tetragram55 oh sorry, looks like an FW change that is necessary to use that tool is not yet on the release version, only in beta. That change is support to
CORS, which is basically adding a header to all requests.You can do manual HTTP communication or use the tool opening chrome with this commands, that turns off the CORS requirement:
@marciogranzotto thanks for state log. Unfortunately, speed == 0 is not going to cause the IndexError here:
This would return 0-th speed, which is Off. I will wait for @tetragram55 to get the state from real device before I can do an educated fix.