cornim / wms_webcontrol

A library to control a Warema WMS WebControl web server.
GNU Lesser General Public License v3.0
15 stars 6 forks source link

ImportError: cannot import name 'CoverDevice' #6

Closed thesaint1975 closed 2 years ago

thesaint1975 commented 2 years ago

hey @cornim,

i tried to install your scripts and integration, i used the 'guide' from @siggy2, i managed to add a missing version key in the manifest.json and but now i'm stuck with this import error:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.config Source: custom_components/warema_wms_webcontrol/cover.py:7 Integration: warema_wms_webcontrol (documentation) First occurred: 06:14:56 (1 occurrences) Last logged: 06:14:56

Platform error: cover Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config.py", line 877, in async_process_component_config platform = p_integration.get_platform(domain) File "/usr/src/homeassistant/homeassistant/loader.py", line 566, in get_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 583, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/config/custom_components/warema_wms_webcontrol/cover.py", line 7, in from homeassistant.components.cover import ( ImportError: cannot import name 'CoverDevice' from 'homeassistant.components.cover' (/usr/src/homeassistant/homeassistant/components/cover/init.py)

i have the warema webcontrol (not pro) and 6 Raffstores. any hints what i'm doing wrong? thanks in advance roland

cornim commented 2 years ago

Hi Roland,

this might not actually be an error on your end. CoverDevice has been deprecated for some time and has probably been removed in a recent version.

This needs to be changed to extend CoverEntity but I haven't gotten around to doing this yet.

Best

cornim commented 2 years ago

Actually this was a really easy fix.

I updated the warema integration. Just download it and try it out.

thesaint1975 commented 2 years ago

wow, many thanks for your fast reply and fix, will try it out and came back with the results thanks roland

thesaint1975 commented 2 years ago

now i get:

Logger: homeassistant.config Source: config.py:454 First occurred: 09:51:33 (1 occurrences) Last logged: 09:51:33

Invalid config for [cover.warema_wms_webcontrol]: [warema_wms_webcontrol] is an invalid option for [cover.warema_wms_webcontrol]. Check: cover.warema_wms_webcontrol->warema_wms_webcontrol. (See /config/configuration.yaml, line 85).

if you have any hints pls let me know thanks

thesaint1975 commented 2 years ago

every dog has its day, i got it to work. syntax failure in my configuration.yaml

cover:
    platform: warema_wms_webcontrol
    webcontrol_server_addr: http://xxx.xxx.xx.xxx
    update_interval: 300
    warema_wms_webcontrol: debug
    homeassistant.components.warema_wms_webcontrol: debug

is working,


cover:
  - platform: warema_wms_webcontrol
    webcontrol_server_addr: http://xxx.xxx.x.xx
    update_interval: 300
    warema_wms_webcontrol: debug
    homeassistant.components.warema_wms_webcontrol: debug

caused the error above.

i tried the feat_shade_stop branch too, it works well. now i'm only faced with some scrappy warema related problems and some curios bevavior as the reported "100% is open" thing

huge thanks for your help and work, @cornim grüsse aus wien, roland

cornim commented 2 years ago

Glad to hear it.