Platform error climate

I updated to 0.100.2 last week and just noticed that I am getting a climate error. Not sure where it’s coming from. My climate seems to be working fine. Can anyone shine some light on this?

Platform error: climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 778, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 232, in get_platform
    f"{self.pkg_path}.{platform_name}"
  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/intesishome/climate.py", line 16, in <module>
    from homeassistant.components.climate.const import (ATTR_OPERATION_MODE,
ImportError: cannot import name 'ATTR_OPERATION_MODE' from 'homeassistant.components.climate.const' (/usr/src/homeassistant/homeassistant/components/climate/const.py)

Based on the error messages I see you are using a custom climate component for IntesisHome created by jnimmo. The version you are using appears to be outdated.

It refers to a variable called, ATTR_OPERATION_MODE, which Home Assistant no longer uses. It’s been replaced by ATTR_HVAC_MODE as part of a general architectural change in the climate component (about 3 versions ago).

You need to upgrade the IntesisHome custom component.

I took a very quick look at the latest version’s code and it now uses ATTR_HVAC_MODE.

I replaced climate.py with the new one from jnimmo, restarted hassio and now hassio wont bootup. It says This site can’t be reached. I can SSH into it though. Did the new climate.py break hassio?

What are the errors reported in the log file?

I can’t access home assistant. How can I find the log file?

You said this:

I can SSH into it though.

Connect and examine the log file.

I apologies, but I never examined logs through SSH. Can you please walk me through it.

I don’t use HASS.IO but I believe the file you want is /config/home-assistant.log

For more information, have a look at Troubleshooting your configuration

I got my hassio back. I updated the code to HVAC_MODE, but now I am getting this error. Do I replace STATE_AUTO to HVAC_MODE_AUTO?

Platform error: climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 778, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 232, in get_platform
    f"{self.pkg_path}.{platform_name}"
  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/intesishome/climate.py", line 16, in <module>
    from homeassistant.components.climate.const import (ATTR_HVAC_MODE,
ImportError: cannot import name 'STATE_AUTO' from 'homeassistant.components.climate.const' (/usr/src/homeassistant/homeassistant/components/climate/const.py)
Connection lost. Reconnecting…

When I update the files form https://github.com/jnimmo/home-assistant/tree/dev/homeassistant/components/intesishome my hassio breakes. I stop homeassistant, place those files in the costom_components folder then start homeassistant back up. It takes about 10 minutes and that’s it. My logs show the following:

`Error: Unknown Error, see logs
core-ssh:~# hassio homeassistant logs
File "/usr/src/homeassistant/homeassistant/config.py", line 772, in async_process_component_config
    p_integration = await async_get_integration_with_requirements(hass, p_name)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 39, in async_get_integration_with_requirements
    integration = await async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 286, in async_get_integrationg...
    integration = Integration.resolve_legacy(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 181, in resolve_legacyocessing...
    comp = _load_file(hass, domain, LOOKUP_PATHS)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 346, 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 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/intesishome/__init__.py", line 7
    <!DOCTYPE html>
    ^
SyntaxError: invalid syntax
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 167, in _async_setup_component
    hass, processed_config
  File "/usr/src/homeassistant/homeassistant/components/onboarding/__init__.py", line 43, in async_setup
    data = await store.async_load()
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 98, in async_load
    return await self._load_task
concurrent.futures._base.CancelledError
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 407, in <module>
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 85, in _process
    self._queue.get(), self.loop
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 433, in result
    raise CancelledError()
concurrent.futures._base.CancelledError
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 399, in main
    exit_code = asyncio_run(setup_and_run_hass(config_dir, args))
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
    return future.result()
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 302, in setup_and_run_hass
    log_no_color=args.log_no_color,
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 150, in async_from_config_file
    config_dict, hass, enable_log=False, skip_pip=skip_pip
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 95, in async_from_config_dict
    await _async_set_up_integrations(hass, config)
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 376, in _async_set_up_integrations
    *(async_setup_component(hass, domain, config) for domain in domains_to_load)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 562, in async_forward_entry_setup
    result = await async_setup_component(self.hass, domain, self._hass_config)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/usr/src/homeassistant/homeassistant/setup.py", line 51, in async_setup_component
    return await task  # type: ignore
  File "/usr/src/homeassistant/homeassistant/setup.py", line 136, in _async_setup_component
    hass, config, integration
  File "/usr/src/homeassistant/homeassistant/config.py", line 772, in async_process_component_config
    p_integration = await async_get_integration_with_requirements(hass, p_name)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 39, in async_get_integration_with_requirements
    integration = await async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 286, in async_get_integration
    integration = Integration.resolve_legacy(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 181, in resolve_legacy
    comp = _load_file(hass, domain, LOOKUP_PATHS)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 346, 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 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/intesishome/__init__.py", line 7
    <!DOCTYPE html>
    ^
SyntaxError: invalid syntax
`

I recommend you contact the author of the Intesishome custom component via their Github repository. All the errors you’ve reported continue to be due to problems with that custom component.

I tried, but couldn’t find his contact info.

The author, jnimmo, is also a member of this community forum.

Just sent him a message. Thank you!

Thanks for reaching out I’ll have a look at it in the next few days

Thank you.

It looks like you haven’t downloaded the raw version of the files (it shouldn’t be showing - please try downloading the raw files :slight_smile:

I guess that explains Home Assistant’s complaint about the presence of <!DOCTYPE html>. :slight_smile:

  File "/config/custom_components/intesishome/__init__.py", line 7
    <!DOCTYPE html>
    ^
SyntaxError: invalid syntax

Seems this has broken the Hive integration also…

The Hive climate component was updated to support ‘Climate 1.0’ (architectural changes to the core climate component) back in July by pvizelli. A quick look at its source code shows that the new terminology is present.

If you’re experiencing problems with it, using the latest version of Home Assistant, it may be a new issue and unrelated to the changes made in July.

1 Like