home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.93k stars 30.99k forks source link

OpenTherm config flow in 0.101.0 #28363

Closed andriej closed 5 years ago

andriej commented 5 years ago

Home Assistant release with the issue: 0.101.0 Last working Home Assistant release (if known): n/a (no conflig flow before) Operating environment (Hass.io/Docker/Windows/etc.): linux/venv Integration: https://www.home-assistant.io/integrations/opentherm_gw/ Description of problem: The automatic 'move' from configuration.yaml to config flow throws an error.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

opentherm_gw:
  termostat:
    name: "Termostat"
    device: !secret opentherm_socket
    climate:
      precision: 0.5
      floor_temperature: False

Traceback (if applicable):

Error while setting up platform opentherm_gw
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/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/opentherm_gw/climate.py", line 43, in async_setup_entry
    config_entry.options,
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/opentherm_gw/climate.py", line 57, in __init__
    self.floor_temp = options[CONF_FLOOR_TEMP]
KeyError: 'floor_temperature'

Additional information: I see the adnotation in docs 'The precision and floor_temperature settings that were supported in configuration.yaml entries have been lost upon import of the configuration.yaml entry into the Integrations panel. You can now configure them as per the following Options paragraph.' although it could be done in informational way, not by error and whole climate entity being unavailable. If it's by design please close the issue

probot-home-assistant[bot] commented 5 years ago

Hey there @mvn23, mind taking a look at this issue as its been labeled with a integration (opentherm_gw) you are listed as a codeowner for? Thanks!

mvn23 commented 5 years ago

Thanks for the report, I will have time to take a look later this weekend.

paulvt commented 5 years ago

FYI, I attempted to completely remove the OpenTherm gateway entry from configuration.yaml alltogether and just re-add it using the Integrations panel. However, it will throw the same exception as mentioned above.

andriej commented 5 years ago

Yes, I did the same (threw away YAML) and same error in log so I guess it will be fixed altogether.

mvn23 commented 5 years ago

Try going through the options flow once, that should get rid of the error for now.

andriej commented 5 years ago

Forgot to add: after going thru it once, it disappeared further on.