AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN
https://github.com/AlexxIT/Blog
MIT License
2.45k stars 342 forks source link

Gateway Dropdown Entities Errors #706

Closed guardianbs closed 1 year ago

guardianbs commented 2 years ago

HA version core-2022.3.3 Xiaomi Gateway 3 v2.0.7 - 2022-03-12

Two problems with gateway entities 'Xiaomi Gateway 3 Command' and 'Xiaomi Gateway 3 Data'.

First problem: After restarting HA and selecting 'Xiaomi Gateway 3 Command - Firmware Lock' the current value is not shown in 'Xiaomi Gateway 3 Data'. Clicking on 'Xiaomi Gateway 3 Data' the dropdown is displayed with neither value highlighted. Selecting 'Enabled' closes the dropdown. Subsequent selection of 'Xiaomi Gateway 3 Command - Firmware Lock' displays the correct value in 'Xiaomi Gateway 3 Data'

image

Second Problem: On initial selection of 'Xiaomi Gateway 3 Command - Zigbee Config' the popup notification 'Failed to call service select/select_option. Option not valid for Xiaomi Gateway 3 Data' is displayed and the error below is logged in home-assistant.log and nothing is logged in Xiaomi Gateway 3 debug log.. Nothing is displayed in 'Xiaomi Gateway 3 Data' until it is selected / clicked and then the Zigbee Config data is displayed.

2022-03-12 16:56:33 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140404695398576] Option not valid for Xiaomi Gateway 3 Data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 192, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1636, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1673, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 668, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 949, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 705, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 53, in async_select_option raise ValueError(f"Option {option} not valid for {entity.name}") ValueError: Option not valid for Xiaomi Gateway 3 Data

aliilhami commented 2 years ago

I have the same problem, any updates here?

deco3690 commented 2 years ago

Im on ver 2.0.7 and the firmware lock and pair options are missing from my GW3 entities. Seems there is an issue assessing the options. I have a second backup rp4i running an older version 1.6.4 and the firmware lock / pairing options are still available and working. Any idea what seems to be the issue? (the 2.0.7 is also not showing any firmware lock or pairing entity)

Logger: homeassistant.components.websocket_api.http.connection Source: components/select/init.py:53 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 3:12:21 PM (8 occurrences) Last logged: 3:48:48 PM

[547846808240] Option not valid for 2-Smart Hub Data [547846808240] Option not valid for 2-Smart Hub Command [547840192624] Option not valid for 2-Smart Hub Command [547840192624] Option not valid for 2-Smart Hub Data [547760389232] Option not valid for 2-Smart Hub Data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 192, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1636, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1673, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 668, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 705, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 53, in async_select_option raise ValueError(f"Option {option} not valid for {entity.name}") ValueError: Option not valid for 2-Smart Hub Data

WarC0zes commented 2 years ago

Same issue with Xiaomi Gateway 3 ZNDMWG03LM.

Logger: homeassistant.components.websocket_api.http.connection
Source: components/select/__init__.py:53
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 08:44:07 (2 occurrences)
Last logged: 08:44:17

[547180032976] Option not valid for Xiaomi Gateway 3 Command
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 192, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1636, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1673, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 668, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 949, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 705, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 53, in async_select_option
    raise ValueError(f"Option {option} not valid for {entity.name}")
ValueError: Option  not valid for Xiaomi Gateway 3 Command
AlexxIT commented 2 years ago

It's known error in latests Hass. Will try to fix it.

gartz commented 1 year ago

is there a way to ran this command in the command line in the meanwhile?

AlexxIT commented 1 year ago

Should be fixed in latest integration release