I’m facing the same issue as @thetomas with a T6 thermostat model.
Enabling debug I get the following:
2020-01-01 02:44:11 DEBUG (SyncWorker_18) [custom_components.lyric.climate] climate config: {}
2020-01-01 02:44:11 DEBUG (SyncWorker_18) [custom_components.lyric.climate] Set up Lyric climate platform
2020-01-01 02:44:11 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform lyric
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/lyric/climate.py", line 71, in setup_platform
LyricThermostat(device) for _, device in hass.data[DATA_LYRIC].thermostats()
File "/home/homeassistant/.homeassistant/custom_components/lyric/climate.py", line 71, in <listcomp>
LyricThermostat(device) for _, device in hass.data[DATA_LYRIC].thermostats()
File "/home/homeassistant/.homeassistant/custom_components/lyric/climate.py", line 145, in __init__
self.update()
File "/home/homeassistant/.homeassistant/custom_components/lyric/climate.py", line 194, in update
for key in self.device.settings["fan"]["allowedModes"]:
KeyError: 'fan'
It looks this model only supports heating and off, but not any allowed fan value:
'allowedModes': ['Heat', 'Off']
'changeableValues': {'mode': 'Heat', …
… 'deviceModel': 'T5-T6'}],
So these lines seem buggy:
for key in self.device.settings["fan"]["allowedModes"]:
self._fan_modes[key.lower()] = self._fan_possible_modes[key.lower()]
While these ones seem correct for this T6 model:
for key in self.device.allowedModes:
self._hvac_modes[key.lower()] = self._hvac_possible_modes[key.lower()]
I’ve just commented the following lines and my T6 thermostat is shown in HA:
# self._fan_modes = {}
# for key in self.device.settings["fan"]["allowedModes"]:
# self._fan_modes[key.lower()] = self._fan_possible_modes[key.lower()]
# self._fan_mode = self._fan_modes[self.device.fanMode.lower()]
# self._supported_features |= SUPPORT_FAN_MODE
Now using HA the thermostat mode can be changed between heating and off. Temp setpoint can also be adjusted successfully. HA log shows the changes:
2020-01-01 04:28:18 DEBUG (SyncWorker_14) [custom_components.lyric.climate] Lyric set_temperature-output-value=18.0
2020-01-01 04:28:25 DEBUG (SyncWorker_5) [custom_components.lyric.climate] Lyric set_temperature-output-value=17.0
2020-01-01 04:28:35 DEBUG (SyncWorker_9) [custom_components.lyric.climate] Lyric set_hvac_mode-output-value=Off
2020-01-01 04:28:54 DEBUG (SyncWorker_19) [custom_components.lyric.climate] Lyric set_hvac_mode-output-value=Heat
BTW @shellster Issues seems unavailable for your lyric fork repository in GitHub. Let me know if you need further testing