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

error: DualRollerShutter.close() got an unexpected keyword argument 'velocity' #28

Closed
tombrain opened this issue Aug 17, 2023 · 8 comments

Comments

@tombrain
Copy link

hello @pawlizio,

since the last update i get an error message and the dualshutters don't work anymore. the simple ones still work fine.

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/velux/cover.py:223
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 21:27:37 (1 occurrences)
Last logged: 21:27:37

[140166350452800] DualRollerShutter.close() got an unexpected keyword argument 'velocity'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/velux/cover.py", line 223, in async_close_cover
    await self.node.close(wait_for_completion=False, velocity=velocity, curtain=self.subtype)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DualRollerShutter.close() got an unexpected keyword argument 'velocity'

@dumpfheimer
Copy link

Sorry, this most likely was my fault. I'll look into it.

@dumpfheimer
Copy link

Please update and test if it works now

@tombrain
Copy link
Author

@dumpfheimer Version 'master'?

@tombrain
Copy link
Author

tombrain commented Aug 19, 2023

I've tested master. I works better but not fine.

Close upper -> works
Then Stop upper -> upper stops, but the lower begin going down :-(

Same scenerio If Press lower up

It works like complete buttons

And this exception

'''
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/velux/cover.py:226
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 09:59:31 (3 occurrences)
Last logged: 09:59:38

[139714237905728]
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/velux/cover.py", line 226, in async_close_cover
await self.node.close(**kwargs)
File "/usr/local/lib/python3.11/site-packages/pyvlx/opening_device.py", line 460, in close
await self.set_position(
File "/usr/local/lib/python3.11/site-packages/pyvlx/opening_device.py", line 429, in set_position
raise PyVLXException("Unable to send command")
pyvlx.exception.PyVLXException:
'''

@pawlizio
Copy link
Owner

Can you activate debugging and share the whole log. I need to understand the single steps to understand whats going on.
Below the config section you need to add to your configuration.yaml to do so.

logger:
  default: warning
  logs:
    pyvlx: debug
    custom_components.velux: debug

@pawlizio
Copy link
Owner

Please update to latest custom version and restart HA, then please test. I added velocity argment also for DualRollerShutters. Hope this can be closed then.

@crivchri
Copy link

crivchri commented Aug 29, 2023

Hi,

I still have similar issues with Home Assistant 2023.8.4 (Core), updated to the latest versions from the UI, when opening several covers at the same time. However I do not know how to check which version of Velux component I have.

Also reported in: #27 (comment)

I get following error several times:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/velux/cover.py:106 
Integration: Home Assistant WebSocket API (documentation, issues) 
First occurred: 18:50:51 (6 occurrences) 
Last logged: 18:51:41

[139751897971008] <PyVLXException description="Unable to send command" />
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/scene/__init__.py", line 114, in _async_activate
    await self.async_activate(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/homeassistant/scene.py", line 334, in async_activate
    await async_reproduce_state(
  File "/usr/src/homeassistant/homeassistant/helpers/state.py", line 67, in async_reproduce_state
    await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/helpers/state.py", line 61, in worker
    await platform.async_reproduce_states(
  File "/usr/src/homeassistant/homeassistant/components/cover/reproduce_state.py", line 125, in async_reproduce_states
    await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/components/cover/reproduce_state.py", line 86, in _async_reproduce_state
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/velux/cover.py", line 106, in async_set_cover_position
    await self.node.set_position(
  File "/usr/local/lib/python3.11/site-packages/pyvlx/opening_device.py", line 49, in set_position
    raise PyVLXException("Unable to send command")
pyvlx.exception.PyVLXException: <PyVLXException description="Unable to send command" />

Thank you in advance for your help and kind regards.

@pawlizio
Copy link
Owner

"Unable to send command" issue is different to "got an unexpected keyword argument 'velocity'". This issue belongs to velocity, so please do not mix.

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

No branches or pull requests

4 participants