Honeywell Lyric Thermostat

Hi,

Could you share the json string you get when you put this is your config:

logger:
  default: error
  logs:
    custom_components.lyric: debug
    custom_components.climate.lyric: debug

Hasn’t happened today. I will share the json strong next time it happens.

@arsaboo actually I was referring to @zherrin85
I’m trying to debug your 401, but can’t really figure it out. I think I’ll just catch it and try a re-authenticate…
I don’t have problems here.

Is it happening after you do something of fire multiple requests at lyric or something? Or just random?

I have the same types of errors. Control from the UI still functions. The “Unauthorized for url” line is curious since it does change the thermostat temps, on/off etc.

2017-08-14 09:22:31 DEBUG (Thread-6) [custom_components.lyric] proceeding with setup
2017-08-14 09:22:31 DEBUG (Thread-6) [custom_components.lyric] [{'name': 'Home', 'city': 'xxxxx', 'daylightSavingTimeEnabled': True, 'geoFences': [{'geoFenceID': xxx, 'longitude': xxxx, 'geoOccupancy': {'outsideFence': 0, 'withinFence': 0}, 'radius': 51016, 'latitude': 44.95008}], 'devices': [{'name': 'thermostat', 'deviceID': 'LCC-00D02DB689C3', 'macID': '00D02DB689C3', 'maxHeatSetpoint': 90, 'currentSchedulePeriod': {'day': 'Monday', 'period': 'Home'}, 'minHeatSetpoint': 50, 'vacationHold': {'enabled': False}, 'allowedTimeIncrements': 15, 'displayedOutdoorHumidity': 86, 'units': 'Fahrenheit', 'scheduleStatus': 'Resume', 'changeableValues': {'mode': 'Off', 'endHeatSetpoint': 68, 'endCoolSetpoint': 75, 'coolSetpoint': 75, 'thermostatSetpointStatus': 'NoHold', 'nextPeriodTime': '22:00:00', 'heatSetpoint': 68, 'heatCoolMode': 'Heat'}, 'isAlive': True, 'isProvisioned': True, 'outdoorTemperature': 63, 'operationStatus': {'mode': 'EquipmentOff', 'fanRequest': False, 'circulationFanRequest': False}, 'allowedModes': ['Heat', 'Off', 'Cool'], 'minCoolSetpoint': 50, 'settings': {'fan': {'allowedModes': ['On', 'Auto', 'Circulate'], 'changeableValues': {'mode': 'Auto'}}, 'specialMode': {}, 'hardwareSettings': {'maxBrightness': 0, 'brightness': 0}, 'temperatureMode': {'air': False}}, 'hasDualSetpointStatus': False, 'scheduleCapabilities': {'availableScheduleTypes': ['None', 'Geofenced', 'TimedNorthAmerica'], 'schedulableFan': False}, 'scheduleType': {'scheduleType': 'Geofence'}, 'isUpgrading': False, 'indoorTemperature': 71, 'deadband': 0, 'maxCoolSetpoint': 90, 'deviceType': 'Thermostat', 'deviceSettings': {}, 'deviceClass': 'Thermostat', 'userDefinedDeviceName': 'thermostat'}], 'locationID': xxx, 'country': 'Usa', 'geoFenceEnabled': True, 'state': 'MN', 'timeZoneId': 'Central', 'zipcode': 'xxx', 'users': [{'deleted': -62135596800, 'userID': xxxx, 'locationRoleMapping': [{'role': 'Adult', 'locationName': 'Home', 'status': 1, 'locationID': 60478}], 'connectedHomeAccountExists': True, 'firstname': 'xxxx', 'activated': True, 'username': 'xxxx', 'created': 1467036268, 'lastname': 'xxx'}], 'timeZone': 'Central Standard Time', 'streetAddress': 'xxx'}]
2017-08-14 09:22:31 DEBUG (Thread-6) [custom_components.lyric] proceeding with discovery of platforms
2017-08-14 09:22:31 DEBUG (Thread-6) [custom_components.lyric] setup done of component
2017-08-14 09:22:31 DEBUG (Thread-3) [custom_components.climate.lyric] climate discovery_info: OrderedDict([('client_id', 'xxxxxx'), ('client_secret', 'xxxx'), ('fan', False)])
2017-08-14 09:22:31 DEBUG (Thread-3) [custom_components.climate.lyric] climate config: {}
2017-08-14 09:22:31 DEBUG (Thread-3) [custom_components.climate.lyric] Set up Lyric climate platform
2017-08-14 09:22:31 DEBUG (Thread-3) [custom_components.climate.lyric] away periods: []
2017-08-14 09:35:33 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2017-08-14 09:37:33 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2017-08-14 09:42:46 ERROR (Thread-7) [lyric] Error Lyric API: 401 Client Error: Unauthorized for url: https://api.honeywell.com/v2/locations?apikey=1eXPJVhFwLI3S57wvxrLl07xqDqmf4jl
2017-08-14 09:42:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.thermostat fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/climate/lyric.py", line 328, in update
    self._location = self.device.where
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 321, in where
    return self._location.name
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 90, in name
    return self._lyric_api._location(self._locationId)['name']
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 778, in _location
    for location in self._locations:
TypeError: 'NoneType' object is not iterable
2017-08-14 09:43:26 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2017-08-14 09:43:47 ERROR (Thread-9) [lyric] Error Lyric API: 401 Client Error: Unauthorized for url: https://api.honeywell.com/v2/locations?apikey=1eXPJVhFwLI3S57wvxrLl07xqDqmf4jl
2017-08-14 09:43:47 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.thermostat fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/climate/lyric.py", line 328, in update
    self._location = self.device.where
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 321, in where
    return self._location.name
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 90, in name
    return self._lyric_api._location(self._locationId)['name']
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 778, in _location
    for location in self._locations:
TypeError: 'NoneType' object is not iterable
2017-08-14 09:44:48 ERROR (Thread-10) [lyric] Error Lyric API: 401 Client Error: Unauthorized for url: https://api.honeywell.com/v2/locations?apikey=1eXPJVhFwLI3S57wvxrLl07xqDqmf4jl
2017-08-14 09:44:48 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.thermostat fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/climate/lyric.py", line 328, in update
    self._location = self.device.where
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 321, in where
    return self._location.name
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 90, in name
    return self._lyric_api._location(self._locationId)['name']
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 778, in _location
    for location in self._locations:
TypeError: 'NoneType' object is not iterable
2017-08-14 09:45:49 ERROR (Thread-11) [lyric] Error Lyric API: 401 Client Error: Unauthorized for url: https://api.honeywell.com/v2/locations?apikey=1eXPJVhFwLI3S57wvxrLl07xqDqmf4jl
2017-08-14 09:45:49 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.thermostat fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/climate/lyric.py", line 328, in update
    self._location = self.device.where
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 321, in where
    return self._location.name
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 90, in name
    return self._lyric_api._location(self._locationId)['name']
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 778, in _location
    for location in self._locations:
TypeError: 'NoneType' object is not iterable
2017-08-14 09:46:50 ERROR (Thread-5) [lyric] Error Lyric API: 401 Client Error: Unauthorized for url: https://api.honeywell.com/v2/locations?apikey=1eXPJVhFwLI3S57wvxrLl07xqDqmf4jl
2017-08-14 09:46:50 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.thermostat fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/climate/lyric.py", line 328, in update
    self._location = self.device.where
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 321, in where
    return self._location.name
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 90, in name
    return self._lyric_api._location(self._locationId)['name']
  File "/home/homeassistant/.homeassistant/deps/lib/python3.4/site-packages/lyric/__init__.py", line 778, in _location
    for location in self._locations:
TypeError: 'NoneType' object is not iterable
2017-08-14 10:06:05 DEBUG (Thread-9) [custom_components.climate.lyric] cool
2017-08-14 10:06:05 DEBUG (Thread-9) [custom_components.climate.lyric] Cool
2017-08-14 10:06:14 DEBUG (Thread-2) [custom_components.climate.lyric] Lyric set_temperature-output-value=70.0
2017-08-14 10:06:28 DEBUG (Thread-4) [custom_components.climate.lyric] off
2017-08-14 10:06:28 DEBUG (Thread-4) [custom_components.climate.lyric] Off

Here are the logs after entering that code and also running through configuration again. Not seeing a JSON string like zarthan has in his. Here is the complete log minus specific info labelled …

2017-08-14 19:13:19 DEBUG (Thread-4) [custom_components.lyric] no access_token, requesting configuration
2017-08-14 19:16:07 DEBUG (Thread-11) [custom_components.lyric] configurator callback
2017-08-14 19:16:07 DEBUG (Thread-11) [custom_components.lyric] configuration done
2017-08-14 19:16:07 DEBUG (Thread-11) [custom_components.lyric] proceeding with setup
2017-08-14 19:16:08 DEBUG (Thread-11) [custom_components.lyric] [{'zipcode': '85295', 'users': [{'userID': 314105, 'username': '', 'created': 1496698511, 'activated': True, 'deleted': -62135596800, 'firstname': 'Tyler', 'lastname': '', 'locationRoleMapping': [{'locationName': 'Home', 'locationID': 273900, 'status': 1, 'role': 'Adult'}], 'connectedHomeAccountExists': True}, {'userID': 316080, 'username': '', 'created': 1496844678, 'activated': True, 'deleted': -62135596800, 'firstname': 'laurel', 'lastname': '', 'locationRoleMapping': [{'locationName': 'Home', 'locationID': 273900, 'status': 1, 'role': 'Adult'}], 'connectedHomeAccountExists': True}], 'streetAddress': '', 'locationID': 273900, 'geoFenceEnabled': False, 'daylightSavingTimeEnabled': False, 'state': 'AZ', 'city': 'Gilbert', 'country': 'Usa', 'comfortLevel': 0, 'timeZoneId': 'Mountain', 'predictiveAIREnabled': False, 'devices': [{'deviceClass': 'Thermostat', 'allowedTimeIncrements': 15, 'isProvisioned': True, 'minHeatSetpoint': 50, 'maxHeatSetpoint': 90, 'displayedOutdoorHumidity': 23, 'allowedModes': ['Heat', 'Off', 'Cool'], 'hasDualSetpointStatus': False, 'deviceID': 'LCC-00D02DBE737D', 'deviceSettings': {}, 'outdoorTemperature': 99, 'settings': {'hardwareSettings': {'maxBrightness': 5, 'brightness': 0}, 'temperatureMode': {'air': False}, 'fan': {'changeableValues': {'mode': 'Auto'}, 'allowedModes': ['On', 'Auto', 'Circulate']}, 'specialMode': {}}, 'deadband': 0, 'scheduleType': {'scheduleSubType': 'NA', 'scheduleType': 'Timed'}, 'name': 'Downstairs', 'maxCoolSetpoint': 90, 'vacationHold': {'enabled': False}, 'macID': '00D02DBE737D', 'isAlive': True, 'currentSchedulePeriod': {'day': 'Monday', 'period': 'Home'}, 'scheduleStatus': 'Resume', 'scheduleCapabilities': {'availableScheduleTypes': ['None', 'Geofenced', 'TimedNorthAmerica'], 'schedulableFan': False}, 'indoorTemperature': 77, 'minCoolSetpoint': 50, 'changeableValues': {'heatSetpoint': 70, 'thermostatSetpointStatus': 'HoldUntil', 'mode': 'Cool', 'endHeatSetpoint': 70, 'nextPeriodTime': '04:00:00', 'heatCoolMode': 'Cool', 'endCoolSetpoint': 76, 'holdUntil': '04:00:00', 'coolSetpoint': 74}, 'units': 'Fahrenheit', 'operationStatus': {'fanRequest': True, 'circulationFanRequest': False, 'mode': 'Cool'}, 'isUpgrading': False, 'userDefinedDeviceName': 'Downstairs', 'deviceType': 'Thermostat'}, {'deviceClass': 'Thermostat', 'allowedTimeIncrements': 15, 'isProvisioned': True, 'minHeatSetpoint': 50, 'maxHeatSetpoint': 90, 'displayedOutdoorHumidity': 23, 'allowedModes': ['Heat', 'Off', 'Cool'], 'hasDualSetpointStatus': False, 'deviceID': 'LCC-00D02DBE72D7', 'deviceSettings': {}, 'outdoorTemperature': 99, 'settings': {'hardwareSettings': {'maxBrightness': 5, 'brightness': 0}, 'temperatureMode': {'air': False}, 'fan': {'changeableValues': {'mode': 'Auto'}, 'allowedModes': ['On', 'Auto', 'Circulate']}, 'specialMode': {}}, 'deadband': 0, 'scheduleType': {'scheduleSubType': 'NA', 'scheduleType': 'Timed'}, 'name': 'Upstairs', 'maxCoolSetpoint': 90, 'vacationHold': {'enabled': False}, 'macID': '00D02DBE72D7', 'isAlive': True, 'currentSchedulePeriod': {'day': 'Monday', 'period': 'Sleep'}, 'scheduleStatus': 'Resume', 'scheduleCapabilities': {'availableScheduleTypes': ['None', 'Geofenced', 'TimedNorthAmerica'], 'schedulableFan': False}, 'indoorTemperature': 77, 'minCoolSetpoint': 50, 'changeableValues': {'heatSetpoint': 62, 'thermostatSetpointStatus': 'NoHold', 'mode': 'Cool', 'endHeatSetpoint': 62, 'nextPeriodTime': '07:00:00', 'heatCoolMode': 'Cool', 'endCoolSetpoint': 74, 'coolSetpoint': 74}, 'units': 'Fahrenheit', 'operationStatus': {'fanRequest': True, 'circulationFanRequest': False, 'mode': 'Cool'}, 'isUpgrading': False, 'userDefinedDeviceName': 'Upstairs', 'deviceType': 'Thermostat'}, {'deviceClass': 'Thermostat', 'allowedTimeIncrements': 15, 'isProvisioned': True, 'minHeatSetpoint': 50, 'maxHeatSetpoint': 90, 'displayedOutdoorHumidity': 23, 'allowedModes': ['Heat', 'Off', 'Cool'], 'hasDualSetpointStatus': False, 'deviceID': 'LCC-00D02DBE736B', 'deviceSettings': {}, 'outdoorTemperature': 99, 'settings': {'hardwareSettings': {'maxBrightness': 5, 'brightness': 0}, 'temperatureMode': {'air': False}, 'fan': {'changeableValues': {'mode': 'Auto'}, 'allowedModes': ['On', 'Auto', 'Circulate']}, 'specialMode': {}}, 'deadband': 0, 'scheduleType': {'scheduleSubType': 'NA', 'scheduleType': 'Timed'}, 'name': 'Master Bedroom', 'maxCoolSetpoint': 90, 'vacationHold': {'enabled': False}, 'macID': '00D02DBE736B', 'isAlive': True, 'currentSchedulePeriod': {'day': 'Monday', 'period': 'Home'}, 'scheduleStatus': 'Resume', 'scheduleCapabilities': {'availableScheduleTypes': ['None', 'Geofenced', 'TimedNorthAmerica'], 'schedulableFan': False}, 'indoorTemperature': 77, 'minCoolSetpoint': 50, 'changeableValues': {'heatSetpoint': 70, 'thermostatSetpointStatus': 'HoldUntil', 'mode': 'Cool', 'endHeatSetpoint': 70, 'nextPeriodTime': '20:30:00', 'heatCoolMode': 'Cool', 'endCoolSetpoint': 76, 'holdUntil': '20:30:00', 'coolSetpoint': 74}, 'units': 'Fahrenheit', 'operationStatus': {'fanRequest': True, 'circulationFanRequest': False, 'mode': 'Cool'}, 'isUpgrading': False, 'userDefinedDeviceName': 'Master Bedroom', 'deviceType': 'Thermostat'}], 'timeZone': 'Mountain Standard Time', 'name': 'Home'}, {'country': 'Usa', 'users': [{'userID': 314105, 'username': '[email protected]', 'created': 1496698511, 'activated': True, 'deleted': -62135596800, 'firstname': 'Tyler', 'lastname': 'Weathers', 'locationRoleMapping': [{'locationName': 'Master Bedroom', 'locationID': 273905, 'status': 1, 'role': 'Adult'}], 'connectedHomeAccountExists': True}], 'zipcode': '85295', 'locationID': 273905, 'geoFenceEnabled': False, 'comfortLevel': 0, 'timeZoneId': 'Mountain', 'daylightSavingTimeEnabled': False, 'predictiveAIREnabled': False, 'timeZone': 'Mountain Standard Time', 'name': 'Master Bedroom'}]
2017-08-14 19:16:08 DEBUG (Thread-11) [custom_components.lyric] proceeding with discovery of platforms
2017-08-14 19:16:08 DEBUG (Thread-11) [custom_components.lyric] setup done of component
2017-08-14 19:16:08 DEBUG (Thread-21) [custom_components.climate.lyric] climate discovery_info: OrderedDict([('client_id', ''), ('client_secret', ''), ('fan', False)])
2017-08-14 19:16:08 DEBUG (Thread-21) [custom_components.climate.lyric] climate config: {}
2017-08-14 19:16:08 DEBUG (Thread-21) [custom_components.climate.lyric] Set up Lyric climate platform
2017-08-14 19:16:08 DEBUG (Thread-21) [custom_components.climate.lyric] away periods: []
2017-08-14 19:16:08 DEBUG (Thread-21) [custom_components.climate.lyric] away periods: []
2017-08-14 19:16:08 DEBUG (Thread-21) [custom_components.climate.lyric] away periods: []
2017-08-14 19:16:08 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform lyric
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 164, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 392, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, 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/climate/lyric.py", line 64, in setup_platform
    for location, device in hass.data[DATA_LYRIC].thermostats()]
  File "/home/homeassistant/.homeassistant/custom_components/climate/lyric.py", line 63, in <listcomp>
    devices = [LyricThermostat(location, device, hass, temp_unit, has_fan, away_periods)
  File "/home/homeassistant/.homeassistant/custom_components/lyric.py", line 159, in thermostats
    for device in location.thermostats:
  File "/srv/homeassistant/lib/python3.5/site-packages/lyric/__init__.py", line 193, in thermostats
    for device in self._devices:
  File "/srv/homeassistant/lib/python3.5/site-packages/lyric/__init__.py", line 160, in _devices
    return self._lyric_api._devices(self._locationId, forceGet)
  File "/srv/homeassistant/lib/python3.5/site-packages/lyric/__init__.py", line 818, in _devices
    value = self._location(locationId)['devices']
KeyError: 'devices'

@zherrin85 OK, I see the problem, there are 2 locations but 1 has no devices.
Should be fixed now.

I tried this and it did not work. Climate did not appear on Front End.

Check errors in the logs. If you are using groups, you need to add the climate entity there.

I dont thibk it eorked fot us either but i havent looked at logs for mote then a second. I will today. I know i am still not seeing any climate entities. I can add climate to anythibg bc i do not know what the rest of that entities name ix. No groups setup here either. Usuay do that after all devicea are up.

I have copied both files to the appropriate directories and reconfigured the Lyric 5. Now I receive this error

Invalid Config
The following components and platforms could not be set up:
climate.lyric
Please check your config

I have verified the config and it says I have a valid configuration. I do not see anything directly related to this file in the home-assistant log.

Please put the logger on debug for Lyric and check your logs again.

Here is the log.

2017-08-16 14:51:34 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.4/site-packages/homeassistant/loader.py”, line 142, in get_component
module = importlib.import_module(path)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/importlib/init.py”, line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 2254, in _gcd_import
File “”, line 2237, in _find_and_load
File “”, line 2226, in _find_and_load_unlocked
File “”, line 1200, in _load_unlocked
File “”, line 1129, in _exec
File “”, line 1471, in exec_module
File “”, line 321, in _call_with_frames_removed
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/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-08-16 14:51:34 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.lyric
2017-08-16 14:51:34 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform climate.lyric: Platform not found.

Where have you placed the 2 lyric.py files? Not in the custom_components folder?

Thank You, that worked. Will this fix my original trouble, when the thermostat was set to cool I would raise the temp setting which caused the mode to go from cool to heat. All I wanted to do was change the temp setting higher and not change the mode to heat.

It should yes. Let me know if it is working as expected.

/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components

/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/climate

I don’t seem to have a custom_components folder. I can create one, but not sure where to put it? /usr/src/app/custom_components or /usr/src/app/homeassistant/custom_components.

Never mind. It needs to be placed in the folder that contains the configuration.yaml. For me it is a bit different because of the Docker. Thanks.

Everything is working great. Thanks for all your help and hard work!!

I am the one that zherrin85 is helping get set up. Since your last update the errors are slightly different. Here is the current log.

2017-08-17 17:44:17 DEBUG (Thread-7) [custom_components.lyric] proceeding with setup
2017-08-17 17:44:18 DEBUG (Thread-7) [custom_components.lyric] [{‘daylightSavingTimeEnabled’: False, ‘name’: ‘Home’, ‘devices’: [{‘name’: ‘Downstairs’, ‘isAlive’: True, ‘minCoolSetpoint’: 50, ‘displayedOutdoorHumidity’: 8, ‘units’: ‘Fahrenheit’, ‘scheduleCapabilities’: {‘schedulableFan’: False, ‘availableScheduleTypes’: [‘None’, ‘Geofenced’, ‘TimedNorthAmerica’]}, ‘maxCoolSetpoint’: 90, ‘deviceType’: ‘Thermostat’, ‘deviceSettings’: {}, ‘allowedModes’: [‘Heat’, ‘Off’, ‘Cool’], ‘scheduleType’: {‘scheduleSubType’: ‘NA’, ‘scheduleType’: ‘Timed’}, ‘allowedTimeIncrements’: 15, ‘maxHeatSetpoint’: 90, ‘scheduleStatus’: ‘Resume’, ‘isProvisioned’: True, ‘deadband’: 0, ‘userDefinedDeviceName’: ‘Downstairs’, ‘currentSchedulePeriod’: {‘day’: ‘Monday’, ‘period’: ‘Away’}, ‘outdoorTemperature’: 100, ‘deviceID’: ‘LCC-00D02DBE737D’, ‘macID’: ‘00D02DBE737D’, ‘operationStatus’: {‘circulationFanRequest’: False, ‘fanRequest’: True, ‘mode’: ‘Cool’}, ‘minHeatSetpoint’: 50, ‘hasDualSetpointStatus’: False, ‘indoorTemperature’: 74, ‘settings’: {‘fan’: {‘allowedModes’: [‘On’, ‘Auto’, ‘Circulate’], ‘changeableValues’: {‘mode’: ‘Auto’}}, ‘temperatureMode’: {‘air’: False}, ‘specialMode’: {}, ‘hardwareSettings’: {‘maxBrightness’: 5, ‘brightness’: 0}}, ‘deviceClass’: ‘Thermostat’, ‘vacationHold’: {‘enabled’: False}, ‘changeableValues’: {‘endCoolSetpoint’: 74, ‘coolSetpoint’: 74, ‘nextPeriodTime’: ‘18:00:00’, ‘endHeatSetpoint’: 62, ‘thermostatSetpointStatus’: ‘NoHold’, ‘heatCoolMode’: ‘Cool’, ‘heatSetpoint’: 62, ‘mode’: ‘Cool’}, ‘isUpgrading’: False}, {‘name’: ‘Upstairs’, ‘isAlive’: True, ‘minCoolSetpoint’: 50, ‘displayedOutdoorHumidity’: 8, ‘units’: ‘Fahrenheit’, ‘scheduleCapabilities’: {‘schedulableFan’: False, ‘availableScheduleTypes’: [‘None’, ‘Geofenced’, ‘TimedNorthAmerica’]}, ‘maxCoolSetpoint’: 90, ‘deviceType’: ‘Thermostat’, ‘deviceSettings’: {}, ‘allowedModes’: [‘Heat’, ‘Off’, ‘Cool’], ‘scheduleType’: {‘scheduleSubType’: ‘NA’, ‘scheduleType’: ‘Timed’}, ‘allowedTimeIncrements’: 15, ‘maxHeatSetpoint’: 90, ‘scheduleStatus’: ‘Resume’, ‘isProvisioned’: True, ‘deadband’: 0, ‘userDefinedDeviceName’: ‘Upstairs’, ‘currentSchedulePeriod’: {‘day’: ‘Monday’, ‘period’: ‘Away’}, ‘outdoorTemperature’: 100, ‘deviceID’: ‘LCC-00D02DBE72D7’, ‘macID’: ‘00D02DBE72D7’, ‘operationStatus’: {‘circulationFanRequest’: False, ‘fanRequest’: True, ‘mode’: ‘Cool’}, ‘minHeatSetpoint’: 50, ‘hasDualSetpointStatus’: False, ‘indoorTemperature’: 74, ‘settings’: {‘fan’: {‘allowedModes’: [‘On’, ‘Auto’, ‘Circulate’], ‘changeableValues’: {‘mode’: ‘Auto’}}, ‘temperatureMode’: {‘air’: False}, ‘specialMode’: {}, ‘hardwareSettings’: {‘maxBrightness’: 5, ‘brightness’: 0}}, ‘deviceClass’: ‘Thermostat’, ‘vacationHold’: {‘enabled’: False}, ‘changeableValues’: {‘endCoolSetpoint’: 74, ‘coolSetpoint’: 74, ‘nextPeriodTime’: ‘18:00:00’, ‘endHeatSetpoint’: 62, ‘thermostatSetpointStatus’: ‘NoHold’, ‘heatCoolMode’: ‘Cool’, ‘heatSetpoint’: 62, ‘mode’: ‘Cool’}, ‘isUpgrading’: False}, {‘name’: ‘Master Bedroom’, ‘isAlive’: True, ‘minCoolSetpoint’: 50, ‘displayedOutdoorHumidity’: 8, ‘units’: ‘Fahrenheit’, ‘scheduleCapabilities’: {‘schedulableFan’: False, ‘availableScheduleTypes’: [‘None’, ‘Geofenced’, ‘TimedNorthAmerica’]}, ‘maxCoolSetpoint’: 90, ‘deviceType’: ‘Thermostat’, ‘deviceSettings’: {}, ‘allowedModes’: [‘Heat’, ‘Off’, ‘Cool’], ‘scheduleType’: {‘scheduleSubType’: ‘NA’, ‘scheduleType’: ‘Timed’}, ‘allowedTimeIncrements’: 15, ‘maxHeatSetpoint’: 90, ‘scheduleStatus’: ‘Resume’, ‘isProvisioned’: True, ‘deadband’: 0, ‘userDefinedDeviceName’: ‘Master Bedroom’, ‘currentSchedulePeriod’: {‘day’: ‘Monday’, ‘period’: ‘Away’}, ‘outdoorTemperature’: 100, ‘deviceID’: ‘LCC-00D02DBE736B’, ‘macID’: ‘00D02DBE736B’, ‘operationStatus’: {‘circulationFanRequest’: False, ‘fanRequest’: True, ‘mode’: ‘Cool’}, ‘minHeatSetpoint’: 50, ‘hasDualSetpointStatus’: False, ‘indoorTemperature’: 74, ‘settings’: {‘fan’: {‘allowedModes’: [‘On’, ‘Auto’, ‘Circulate’], ‘changeableValues’: {‘mode’: ‘Auto’}}, ‘temperatureMode’: {‘air’: False}, ‘specialMode’: {}, ‘hardwareSettings’: {‘maxBrightness’: 5, ‘brightness’: 0}}, ‘deviceClass’: ‘Thermostat’, ‘vacationHold’: {‘enabled’: False}, ‘changeableValues’: {‘endCoolSetpoint’: 74, ‘coolSetpoint’: 74, ‘nextPeriodTime’: ‘18:00:00’, ‘endHeatSetpoint’: 62, ‘thermostatSetpointStatus’: ‘NoHold’, ‘heatCoolMode’: ‘Cool’, ‘heatSetpoint’: 62, ‘mode’: ‘Cool’}, ‘isUpgrading’: False}], ‘city’: ‘’, ‘timeZoneId’: ‘Mountain’, ‘streetAddress’: ‘’, ‘locationID’: 273900, ‘timeZone’: ‘Mountain Standard Time’, ‘state’: ‘’, ‘zipcode’: ‘’, ‘predictiveAIREnabled’: False, ‘users’: [{‘locationRoleMapping’: [{‘locationName’: ‘Home’, ‘role’: ‘Adult’, ‘status’: 1, ‘locationID’: 273900}], ‘isCurrentUser’: True, ‘deleted’: -62135596800, ‘username’: ‘’, ‘firstname’: ‘Tyler’, ‘connectedHomeAccountExists’: True, ‘lastname’: ‘’, ‘activated’: True, ‘userID’: 314105, ‘created’: 1496698511}, {‘locationRoleMapping’: [{‘locationName’: ‘Home’, ‘role’: ‘Adult’, ‘status’: 1, ‘locationID’: 273900}], ‘isCurrentUser’: False, ‘deleted’: -62135596800, ‘username’: ‘’, ‘firstname’: ‘l’, ‘connectedHomeAccountExists’: True, ‘lastname’: ‘’, ‘activated’: True, ‘userID’: 316080, ‘created’: 1496844678}], ‘country’: ‘Usa’, ‘comfortLevel’: 0, ‘geoFenceEnabled’: False}, {‘timeZone’: ‘Mountain Standard Time’, ‘name’: ‘Master Bedroom’, ‘comfortLevel’: 0, ‘zipcode’: ‘’, ‘predictiveAIREnabled’: False, ‘timeZoneId’: ‘Mountain’, ‘users’: [{‘locationRoleMapping’: [{‘locationName’: ‘Master Bedroom’, ‘role’: ‘Adult’, ‘status’: 1, ‘locationID’: 273905}], ‘isCurrentUser’: True, ‘deleted’: -62135596800, ‘username’: ‘’, ‘firstname’: ‘Tyler’, ‘connectedHomeAccountExists’: True, ‘lastname’: ‘’, ‘activated’: True, ‘userID’: 314105, ‘created’: 1496698511}], ‘country’: ‘Usa’, ‘daylightSavingTimeEnabled’: False, ‘geoFenceEnabled’: False, ‘locationID’: 273905}]
2017-08-17 17:44:18 DEBUG (Thread-7) [custom_components.lyric] proceeding with discovery of platforms
2017-08-17 17:44:18 DEBUG (Thread-7) [custom_components.lyric] setup done of component
2017-08-17 17:44:18 DEBUG (Thread-19) [custom_components.climate.lyric] climate discovery_info: OrderedDict([(‘client_id’, ‘hrjN4OEtpILLscAS7dpcQ4sUUiX0nqcv’), (‘client_secret’, ‘uCk8ZrARwV624uzG’), (‘fan’, False)])
2017-08-17 17:44:18 DEBUG (Thread-19) [custom_components.climate.lyric] climate config: {}
2017-08-17 17:44:18 DEBUG (Thread-19) [custom_components.climate.lyric] Set up Lyric climate platform
2017-08-17 17:44:18 DEBUG (Thread-19) [custom_components.climate.lyric] away periods: []
2017-08-17 17:44:18 DEBUG (Thread-19) [custom_components.climate.lyric] away periods: []
2017-08-17 17:44:18 DEBUG (Thread-19) [custom_components.climate.lyric] away periods: []
2017-08-17 17:44:18 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform lyric
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py”, line 164, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File “/usr/lib/python3.5/asyncio/tasks.py”, line 392, in wait_for
return fut.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 274, 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/climate/lyric.py”, line 64, in setup_platform
for location, device in hass.data[DATA_LYRIC].thermostats()]
File “/home/homeassistant/.homeassistant/custom_components/climate/lyric.py”, line 63, in
devices = [LyricThermostat(location, device, hass, temp_unit, has_fan, away_periods)
File “/home/homeassistant/.homeassistant/custom_components/lyric.py”, line 159, in thermostats
for device in location.thermostats:
File “/srv/homeassistant/lib/python3.5/site-packages/lyric/init.py”, line 193, in thermostats
for device in self._devices:
File “/srv/homeassistant/lib/python3.5/site-packages/lyric/init.py”, line 160, in _devices
return self._lyric_api._devices(self._locationId, forceGet)
File “/srv/homeassistant/lib/python3.5/site-packages/lyric/init.py”, line 820, in _devices
return value
UnboundLocalError: local variable ‘value’ referenced before assignment