Ludy87 / xplora_watch

Xplora® Watch Home Assistant Integration
MIT License
49 stars 6 forks source link

🐛 unexpected keyword argument 'silentId' #172

Closed hmdrmch closed 1 year ago

hmdrmch commented 1 year ago

What version of Integration has the issue?

V2.7.3

System Health details

System Information

version core-2023.2.5
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.10.7
os_name Linux
os_version 5.15.0-60-generic
arch x86_64
timezone Europe/Copenhagen
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4993 Installed Version | 1.30.1 Stage | running Available Repositories | 1291 Downloaded Repositories | 41
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 2 -- | -- resources | 21 views | 5 mode | storage
Recorder oldest_recorder_run | February 13, 2023 at 23:05 -- | -- current_recorder_run | February 23, 2023 at 12:10 database_engine | mysql database_version | 10.11.2

Checklist

Describe the issue

Toggling the Watch Silent switch on returns an error. It is possible to turn them off, but they won't turn on within Home Assistant.

Reproduction steps

  1. turn off Silent switch
  2. try and turn it on again
  3. error message appears and it does not get turned on

Debug logs

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/xplora_watch/switch.py:192
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 13:48:18 (1 occurrences)
Last logged: 13:48:18

[140114939648160] PyXploraApi.setEnableSilentTime() got an unexpected keyword argument 'silentId'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 968, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 720, in _handle_entity_call
    await result
  File "/config/custom_components/xplora_watch/switch.py", line 192, in async_turn_on
    silents = await self.coordinator.controller.setEnableSilentTime(silentId=self._silent[ATTR_ID])
TypeError: PyXploraApi.setEnableSilentTime() got an unexpected keyword argument 'silentId'
github-actions[bot] commented 1 year ago

:wave: @hmdrmch, it is checked whether there is a bug. Please have some patience. This action was performed automatically.

github-actions[bot] commented 1 year ago

:wave: @hmdrmch, we found the bug, it will be fixed shortly. This action was performed automatically.

hmdrmch commented 1 year ago

It still happens on V2.7.5. Only now I can't toggle the switch off. Before it was the other way around.

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/xplora_watch/switch.py:199 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 16:55:23 (2 occurrences) Last logged: 16:55:36

[140077349118128] PyXploraApi.setDisableSilentTime() got an unexpected keyword argument 'silent_id' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 968, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 720, in _handle_entity_call await result File "/config/custom_components/xplora_watch/switch.py", line 199, in async_turn_off silents = await self.coordinator.controller.setDisableSilentTime(silent_id=self._silent[ATTR_ID]) TypeError: PyXploraApi.setDisableSilentTime() got an unexpected keyword argument 'silent_id'

Ludy87 commented 1 year ago

Sorry, I have an error in the library, I will fix it as soon as possible.