core: Alexa Discovery Error: self.entity.attributes[vacuum.ATTR_FAN_SPEED_LIST] KeyError: 'fan_speed_list'
Testing Alexa HAASKA Lambda discovery throws an error for my vacuum domain. I’m guessing my ecobot vacuum doesn’t have fan speed options. I can’t get Alexa to discover the vacuum because of this error. If I don’t include the vacuum in the include_domains, everything works fine.
Environment
arch | x86_64
-- | --
dev | false
docker | true
hassio | true
os_name | Linux
os_version | 4.19.104
python_version | 3.7.7
timezone | America/Denver
version | 0.108.9
virtualenv | false
- Home Assistant Core release with the issue: 108.9
- Last working Home Assistant Core release (if known): Unknown
- Operating environment (Home Assistant/Supervised/Docker/venv): Above
- Integration causing this issue: Alexa
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/alexa.smart_home
alexa:
smart_home:
locale: en-US
endpoint: "https://api.amazonalexa.com/v3/events"
client_id: xxx
client_secret: xxx
filter:
include_domains:
- switch
- light
- climate
- vacuum
- lock
Traceback/Error logs
Amazon Dev console reports:
Execution result: succeeded
but returns null
and the logs show an internal server error:
[ERROR] 2020-05-07T16:16:57.347Z xxx HomeAssistant error 500 Internal Server Error
HA Log:
2020-05-07 10:16:57 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/alexa/smart_home_http.py", line 120, in post
hass, self.smart_home_config, message, context=core.Context(user_id=user.id)
File "/usr/src/homeassistant/homeassistant/components/alexa/smart_home.py", line 39, in async_handle_message
response = await funct_ref(hass, config, directive, context)
File "/usr/src/homeassistant/homeassistant/components/alexa/handlers.py", line 84, in async_api_discovery
for alexa_entity in async_get_entities(hass, config)
File "/usr/src/homeassistant/homeassistant/components/alexa/handlers.py", line 85, in <listcomp>
if config.should_expose(alexa_entity.entity_id)
File "/usr/src/homeassistant/homeassistant/components/alexa/entities.py", line 289, in serialize_discovery
capabilities.append(i.serialize_discovery())
File "/usr/src/homeassistant/homeassistant/components/alexa/capabilities.py", line 205, in serialize_discovery
capability_resources = self.capability_resources()
File "/usr/src/homeassistant/homeassistant/components/alexa/capabilities.py", line 1503, in capability_resources
speed_list = self.entity.attributes[vacuum.ATTR_FAN_SPEED_LIST]
KeyError: 'fan_speed_list'
Pretty sure this is just a result of a breaking change somewhere along the line. I’m not a programmer so I don’t know how to fix the relevant code.
I have a similar issue with the climate domain; I’m going to open up another issue for that.
Thanks!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (7 by maintainers)
@dshokouhi Alexa Smart Home integration checks for
SUPPORT_FAN_SPEEDsupport before pulling thespeed_listit doesn’t look likeneatohas that support. So it’s good 👍