Honeywell Lyric Thermostat

Here is the error

“Integrations need to be in their own folder. Change climate/lyric.py to lyric/climate.py. This will stop working soon.”

But it is working- seems to be just a warning.

Hm… One more error…

Error loading custom_components.lyric.climate. Make sure all dependencies are installed

Traceback (most recent call last): File “/usr/local/lib/python3.7/site-packages/homeassistant/loader.py”, line 147, in _load_file module = importlib.import_module(path) File “/usr/local/lib/python3.7/importlib/init.py”, line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “<frozen importlib._bootstrap>”, line 1006, in _gcd_import File “<frozen importlib._bootstrap>”, line 983, in _find_and_load File “<frozen importlib._bootstrap>”, line 962, in _find_and_load_unlocked ModuleNotFoundError: No module named ‘custom_components.lyric.climate’; ‘custom_components.lyric’ is not a package

I tried the update myself now via hass.io.
I did two changes after the update:

  • renamed folder custom_components/climate to custom_components/lyric
  • renamed file custom_components/climate/lyric.py to custom_components/lyric/climate.py

based on what I understand should be changed because of the update. Unfortunately, another error then @mp1111
AttributeError: module ‘custom_components.lyric’ has no attribute ‘setup’

Anyone an idea?

Did you try this structure? I’m on holiday so not going to upgrade to test now…

I tried it @Tyfoon, but at that point without result.
I completely removed the custom component folder and git pulled my config again and now it works.

So perhaps some kind of caching/corrupt files, I don’t know.

So the new 0.88 structure should be:

  • /custom_components/lyric/__ init __.py (without the spaces)
  • /custom_components/lyric/climate.py

the init file is a rename (and move) of the lyric.py

1 Like

Glad you got ti working! Still not working for me- perhaps you can provide a link your folder?

Got it to work as well. A little more patience was needed:)

1 Like

@teunehv Happy to hear you got it working!

So just to be sure:

  • Created “lyric” folder under “custom_components” folder
  • The lyric.py that was present in custom_components folder >> Moved to custom_components/lyric and renamed “init.py”
  • Moved the “lyric.py” that was present under “custom_components/climate” to “custom_components/lyric” and renamed it to “climate.py”

Is that correct? What did you do with the “services.yaml” under “custom_components/climate”

Yes, that’s it @Tyfoon Auto correct on the forum prevent the real name of init.py, should be __ init.py __ without the spaces.

I didn’t have the services.yaml and it was working. Wasn’t even aware of the file, what’s the purpose?

I am trying to get this set up on 0.88 for the first time and I am not having any luck

my configuration.yaml is in /home/homeassistant/.homeassistant/configuration.yaml

so I then created the directory /home/homeassistant/.homeassistant/custom_components/

I wget the files from above

renamed them to init.py and /climate/climate.py as per Post #515

and I am getting these errors

Setup failed for lyric: Component not found.
11:45 PM setup.py (ERROR)
Unable to find component lyric
11:45 PM loader.py (ERROR)

does anyone have any ideas ? thanks

I didn’t make any changes, just went into the ~/homeassistant/custom_components/pycache, removed the files and restarted HA. Everything just started working fine after that.

My understanding is that services.yaml is the file used to populate the services available in the lyric component, when you’re accessing developper tools > services.
So… unless you’re using them, not required, but I’d rather having it there as a guide just in case… :slight_smile:

You should have:
custom_components/lyric/climate.py
custom_components/lyric/__init__.py
custom_components/lyric/services.yaml
Could you try this approach? I’ve hassio 0.88.1, and it’s working (I had a different folder structure with 0.87.2, but now having a warning message that is solved with this one).

What should be in the services.yaml ?
Haven’t seen the file before

do you have an example of the services.yaml by chance?

services.yaml (3.2 KB)

1 Like

I am trying to get everything updated to work in upcoming versions. I am on hass.io currently running 0.88.0

I created a new directory /config/custom_components/lyric and moved /custom_components/lyric.py into that directory then renamed it __ init__.py (without spaces)

I moved /custom_components/climate/lyric.py to /custom_components/lyric and renamed it climate.py

I cleared all the __ pycache __ and removed /custom_components/climate

Restarted HA and now getting the following error

Any help is greatly appreciated

Error loading custom_components.lyric. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 147, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import 
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/custom_components/lyric/__init__.py", line 16, in <module>
  from custom_components.lyric import DATA_LYRIC, CONF_FAN, 
CONF_AWAY_PERIODS
ImportError: cannot import name 'DATA_LYRIC' from 'custom_components.lyric' 
(/config/custom_components/lyric/__init__.py)

Capture

Capture2

If you had it working int the older version, all I had to do is upgrade to new version>remove files in ./pycache>restart HA.

Everything started working again for me without issue. My directory is:

root@homeassistant:~/homeassistant/custom_components# du -a -h
12K     ./climate/__pycache__/lyric.cpython-37.pyc
28K     ./climate/__pycache__
12K     ./climate/lyric.py
44K     ./climate
8.0K    ./__pycache__/lyric.cpython-37.pyc
12K     ./__pycache__
8.0K    ./lyric.py

I had it working on 0.88.0 (my current version) with the original setup and the warning about it not working soon. I tried switching everything over to the new format and thats when it stopped working.

LOL, the old adage “if it works don’t fix it” :grinning:

Anyway I’m currently on 0.88.1 with no changes to how I had it working in 0.87.x versions. All I did was delete what was in the pycache folder and restart HA.