Honeywell Lyric Thermostat

Just found this thread, I created the custom_components directory in .homeassistant but I’m still seeing the error that it can not find the component. Oddly however, the oauth config went well so it seems like it can find the code. Any thoughts? I saw what looked like a reference to a climate sub directory so I tried that too with no luck.

/home/homeassistant/.homeassistant/custom_components/climate/lyric.py

I have two honeywell Cameras as C1 and a C2

This is a Thermostat component and not a camera component.

I was answering the question if anyone has a camera or freeze detector . . .

I’m trying to set up my Thermostat here

There are two lyric.py files - one in custom_component and the other one in custom_component\climate

1 Like

Just wanted to speak up that I’m have successfully set this up under custom_components. I am a developer myself so let me know if you need any specific help. So far this is working great for me.

The set_temperature service is working fine for the temperature set point but I cannot get it to work for setting the target_temp_high and target_temp_low values. Are those currently supported by python-lyric? Also, setting to Auto mode doesn’t seem to work. It changes back to Cool.

Looking at the logs I see this error from the REST API.

2017-10-26 00:24:51 ERROR (SyncWorker_8) [lyric] HTTP Error Lyric API: 400 Client Error: Bad Request for url: https://api.honeywell.com/v2/devices/thermostats/LCC-xxxx?locationId=<secret>&apikey=<secret>

That must be related somehow.

Ok, so from digging around python-lyric and in the API docs it would seem that you cannot set a target high and low temperature. Also, ‘auto’ mode is a flag called ‘autoChangeoverActive’ which is not getting set correctly at the HA component level. So the lyric must handle the high and low changeover range internally allowing the user to just set a temperature setpoint. This is fine as long as it works correctly but I haven’t actually tried this setting yet.

The error above is caused by my defining a target_temp_high and low instead of temperature. This causes the request to be malformed and thus the 400 error. Might be nice to have a better error thrown but it’s not a big deal. The primary issue here is that the ‘auto’ mode is not handled correctly, both in the UI card and in the component. I’ll do some more digging tonight in the component.

Regarding the idea of using a template sensor to retrieve the humidity value on a Lyric Round, do you have any hints on how to get at the json object? It’s not listed as an attribute on the States tab.

I’m having an issue with an error:

2017-11-05 19:24:58 ERROR (MainThread) [homeassistant.setup] Error during setup of component lyric Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py”, line 194, in _async_setup_component component.setup, hass, processed_config)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run result = self.fn(*self.args, **self.kwargs)
File “/home/homeassistant/.homeassistant/custom_components/lyric.py”, line 115, in setup import lyric
File “/srv/homeassistant/lib/python3.5/site-packages/lyric/init.py”, line 6, in from requests_oauthlib import OAuth2Session
File “/srv/homeassistant/lib/python3.5/site-packages/requests_oauthlib/init.py”, line 9, in if requests.version < ‘2.0.0’:
TypeError: unorderable types: module() < str()

Everything was working fine until i updated to the latest HA release today, now, just this custom component stopped working, everything else is fine.

Same here after the update when I change the temperature no change

I’ll look into it shortly, got some time soon.

1 Like

Great…look forward to an official PR :slight_smile:

1 Like

I was able to fix the error and get it working again.

In the requests oauthlib init.py file there is an if statement that calls requests.__version__ and compares it to ‘2.0.0’

I get a type error every time:
File "/srv/USER/lib/python3.5/site-packages/requests_oauthlib/__init__.py", line 9, in <module> if requests.__version__ < '2.0.0': TypeError: unorderable types: module() < str()

I was able to manually remove the error by replacing requests.__version__ with ‘2.18.4’ which is the value it should be pulling (if you are running 2.18.4). If I run the code in a python terminal, it works, but if I run it as a script it fails.

I have submitted this in a bug report on the github page

https://github.com/requests/requests-oauthlib/issues/299

I have moved my All-In-One-Installation onto Raspbian Stretch with Desktop. I have everything working except for my Lyric T5 thermostat. I am including the information from home-assistant.log. Any help would be appreciated.
Thank You in advance

2017-11-24 11:53:37 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.climate.lyric. Make sure all dependencies are installed
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/loader.py”, line 142, in get_component
module = importlib.import_module(path)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 986, in _gcd_import
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 673, in _load_unlocked
File “”, line 673, in exec_module
File “”, line 222, in _call_with_frames_removed
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/climate/lyric.py”, line 16, in
from custom_components.lyric import DATA_LYRIC, CONF_FAN, CONF_AWAY_PERIODS
ImportError: No module named ‘custom_components’
2017-11-24 11:53:37 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.lyric
2017-11-24 11:53:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform climate.lyric: Platform not found.

I have found Bram_Kragten previous fix on my old system. I guess I had better start keeping better notes.

Thanks Bram

Bram_KragtenAug 16
Where have you placed the 2 lyric.py5 files? Not in the custom_components folder?

Bram_Kragten:
You should either move it to custom_components or change line 16 of climate/lyric.py:

from custom_components.lyric import DATA_LYRIC

from homeassistant.components.lyric import DATA_LYRIC

Looks like 0.59 broke Lyric thermostat. Seeing the following errors

Sun Dec 03 2017 15:43:35 GMT-0500 (Eastern Standard Time)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 399, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 247, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 231, in async_update_ha_state
    attr)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 333, in _attr_setter
    value = getattr(self, name)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 736, in supported_features
    raise NotImplementedError()
NotImplementedError

All climate platforms are required to implement the supported_features method now. Custom components must adapt to this. Sorry for breaking this, but with changes like this, we can only adapt the “official” platform ourselves.

Will fix it today