elric91 / homeassistant_zigate

Custom components for Home Assistant
MIT License
22 stars 5 forks source link

b0rken with next HASS #26

Closed lolorc closed 5 years ago

lolorc commented 6 years ago

hi,

just to let you know, it looks like your plugin will be broken by next HASS update 0.69

elric91 commented 6 years ago

Did you experienced it or did you see anything in the coming release note ?

lolorc commented 6 years ago

sorry I should have given the stacktrace, yes I experienced it and I reverted to the latest stable, hence me not giving more detail.

lolorc commented 6 years ago

my mistake, looks ok with 0.69.1, it's with dev (next 0.70) that it looks broken

max5962 commented 6 years ago

@lolorc it's still broken in the last version of HASS ( 0.71 ?)

ISO-B commented 6 years ago

If it's broken with newest HASS, could someone provide stacktrace. I don't have time update my own HASS until fall.

max5962 commented 6 years ago

image No issues with the latest version.

ruimarinho commented 6 years ago

I've experienced the same issue as well — trouble with 0.70.0+ but now working fine with 0.72.1 again.

pdecat commented 6 years ago

Apparently, the issue is happening when try to load a complete configuration (with zigate: and platform: zigate light, sensor or switch items) on a clean install of home assistant where pyzigate package is not already installed:

2018-06-27 07:10:53 ERROR (SyncWorker_1) [homeassistant.loader] Unable to find component light.zigate                                                                                                                                                                                                                
2018-06-27 07:10:53 ERROR (SyncWorker_1) [homeassistant.loader] Error loading custom_components.light.zigate. Make sure all dependencies are installed                                                                                                                                                               
Traceback (most recent call last):                                                                                                                                                                                                                                                                                   
  File "/usr/lib/python3.6/site-packages/homeassistant/loader.py", line 86, in get_component                                                                                                                                                                                                                         
    module = importlib.import_module(path)                                                                                                                                                                                                                                                     
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module                                                                                                                                                                                                                                        
    return _bootstrap._gcd_import(name[level:], package, level)                                                                                                                                                                                                                                                      
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import                                                                                                                                                                                                                                                     
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load                                                                                                                                                                                                                                                  
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked                                                                                                                                                                                                                                         
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked                                                                                                                                                                                                                                                  
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module                                                                                                                                                                                                                           
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed                                                                                                                                                                                           
  File "/config/custom_components/light/zigate.py", line 17, in <module>                                                                                                                                                                                                                              
    from pyzigate.zgt_parameters import *                                                                                                                                                                                                                                                                            
ModuleNotFoundError: No module named 'pyzigate'                                                                                                                                                                                                                                                                      

Checking configuration then fails with:

2018-06-27 07:17:07 ERROR (MainThread) [homeassistant.components.hassio] Testing configuration at /config
Failed config
  General Errors:
    - Platform not found: switch.zigate
    - Platform not found: switch.zigate
    - Platform not found: light.zigate
    - Platform not found: light.zigate
    - Platform not found: light.zigate
    - Platform not found: light.zigate

Successful config (partial)

Workaround is to comment all but zigate: configuration, restart and let HA install the dependencies, uncomment, then restart again.

Looks like its a matter of missing dependencies and requirements in the light, sensor and switch components:

DEPENDENCIES = ['zigate']
REQUIREMENTS = ['pyzigate==0.1.3.post1']
ISO-B commented 5 years ago

Tested with HASS 0.82.1 without pyzigate installed no errors.