iMicknl / ha-tahoma

Custom component for Home Assistant to interact with smart devices via Somfy TaHoma or other OverKiz based API's.
MIT License
151 stars 30 forks source link

__init__() missing 2 required keyword-only arguments: 'alive' and 'up_to_date' after update to 2.4.5 #367

Closed dckiller51 closed 3 years ago

dckiller51 commented 3 years ago

Describe the bug

Loss of shutters since the last version 2.4.5

Logger: custom_components.tahoma
Source: custom_components/tahoma/__init__.py:112
Integration: Somfy TaHoma (documentation, issues)
First occurred: 15:13:41 (1 occurrences)
Last logged: 15:13:41

__init__() missing 2 required keyword-only arguments: 'alive' and 'up_to_date'
Traceback (most recent call last):
  File "/config/custom_components/tahoma/__init__.py", line 112, in async_setup_entry
    gateways = await client.get_gateways()
  File "/usr/local/lib/python3.8/site-packages/backoff/_async.py", line 133, in retry
    ret = await target(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pyhoma/client.py", line 135, in get_gateways
    gateways = [Gateway(**g) for g in humps.decamelize(response)]
  File "/usr/local/lib/python3.8/site-packages/pyhoma/client.py", line 135, in <listcomp>
    gateways = [Gateway(**g) for g in humps.decamelize(response)]
TypeError: __init__() missing 2 required keyword-only arguments: 'alive' and 'up_to_date'

Environment (please complete the following information):

Device: (if your problem is related to a specific device)

Additional context

Add any other context about the problem here.

iMicknl commented 3 years ago

Thanks for reporting @dckiller51. For now, I would advise to downgrade to v2.4.3.

Which hub are you using? (Somfy TaHoma, Connexoon, CozyTouch, etc.).

iMicknl commented 3 years ago

Could you give https://github.com/iMicknl/ha-tahoma/archive/fix/fix_gateway_params_issues.zip a try? Extract this file and place custom_components/tahoma in your custom_components folder.

dckiller51 commented 3 years ago

Thanks for reporting @dckiller51. For now, I would advise to downgrade to v2.4.3.

Which hub are you using? (Somfy TaHoma, Connexoon, CozyTouch, etc.).

Somfy Tahoma Yes downgrade to v2.4.3 works. I'm testing tonight, I'm not at home to send the files

iMicknl commented 3 years ago

Thanks @dckiller51. Do you perhaps have the Somfy TaHoma first generation? It is weird how their API is not standardized on all gateways...

dckiller51 commented 3 years ago

Thanks @dckiller51. Do you perhaps have the Somfy TaHoma first generation? It is weird how their API is not standardized on all gateways...

This is the Tahoma V2 version 2020.6.4-1 5

iMicknl commented 3 years ago

That is weird, I have the same version (2020.6.4-15) and for me this error doesn't occur...

image

dckiller51 commented 3 years ago

That is weird, I have the same version (2020.6.4-15) and for me this error doesn't occur...

image

I don't have the hub in HA device. The information, I recovered them in the official application.

iMicknl commented 3 years ago

@dckiller51 I know, that is the error you are facing in this issue :-). The fixed version should add your hub as an entity in Home Assistant.

dckiller51 commented 3 years ago

Pourriez-vous essayer https://github.com/iMicknl/ha-tahoma/archive/fix/fix_gateway_params_issues.zip ? Extrayez ce fichier et placez-le custom_components/tahomadans votre custom_componentsdossier.

This version works. I do have two additional devices. (Tahoma V2 hub and Home Protect System hub). Thank you

iMicknl commented 3 years ago

Thanks! Your Home Protect System hub is also a gateway, that is what caused this issue. We will add this to the next version.

dckiller51 commented 3 years ago

@iMicknl Hello, Home Assistant 2021.2.0 updated suite. Mistake

Setup failed for tahoma: Requirements for tahoma not found: ['git+https://github.com/iMicknl/python-tahoma-api.git@fix/make_gateway_params_optional#pyhoma==0.5.5'].
iMicknl commented 3 years ago

@dckiller51, sorry that branch has been removed already. You can download the latest version (v2.4.6) via HACS or via GitHub, where this fix is included.

dckiller51 commented 3 years ago

@iMicknl thank you very much for your speed