Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: upgrade to 2.3.0 failing #89

Closed
daroga0002 opened this issue May 7, 2024 · 2 comments · Fixed by #90
Closed

[Bug]: upgrade to 2.3.0 failing #89

daroga0002 opened this issue May 7, 2024 · 2 comments · Fixed by #90
Assignees
Labels
bug Something isn't working triage Newly opened issues or features that are not yet confirmed

Comments

@daroga0002
Copy link
Contributor

daroga0002 commented May 7, 2024

The problem

Something after upgrade to 2.3.0 stopped working, directly after upgrade I see errors in log related to multiple entities (climate and tiles).

What version of Tech Controllers integration has the issue?

v2.3.0

What version of Home Assistant Core has the issue?

core-2025.5.2

What was the last working version of Tech Controller integration?

v2.2.1

Diagnostics information

No response

Anything in the logs that might be useful for us?

2024-05-07 10:58:09.561 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up tech platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/tech/binary_sensor.py", line 45, in async_setup_entry
    entities.append(RelaySensor(tile, coordinator, config_entry))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tech/binary_sensor.py", line 92, in __init__
    TileBinarySensor.__init__(self, device, coordinator, config_entry)
  File "/config/custom_components/tech/entity.py", line 38, in __init__
    if self._config_entry.data[INCLUDE_HUB_IN_NAME]:
       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'include_hub_in_name'
2024-05-07 10:58:09.659 ERROR (MainThread) [homeassistant.components.climate] Error while setting up tech platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/tech/climate.py", line 46, in async_setup_entry
    TechThermostat(zones[zone], coordinator, config_entry) for zone in zones
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tech/climate.py", line 69, in __init__
    if not self._config_entry.data[INCLUDE_HUB_IN_NAME]
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'include_hub_in_name'
2024-05-07 10:58:09.841 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up tech platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/tech/sensor.py", line 87, in async_setup_entry
    TileTemperatureSignalSensor(
  File "/config/custom_components/tech/sensor.py", line 1182, in __init__
    TileSensor.__init__(self, device, coordinator, config_entry)
  File "/config/custom_components/tech/entity.py", line 38, in __init__
    if self._config_entry.data[INCLUDE_HUB_IN_NAME]:
       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'include_hub_in_name'
2024-05-07 10:58:57.325 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up tech platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/tech/binary_sensor.py", line 45, in async_setup_entry
    entities.append(RelaySensor(tile, coordinator, config_entry))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tech/binary_sensor.py", line 92, in __init__
    TileBinarySensor.__init__(self, device, coordinator, config_entry)
  File "/config/custom_components/tech/entity.py", line 38, in __init__
    if self._config_entry.data[INCLUDE_HUB_IN_NAME]:
       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'include_hub_in_name'
2024-05-07 10:58:57.399 ERROR (MainThread) [homeassistant.components.climate] Error while setting up tech platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/tech/climate.py", line 46, in async_setup_entry
    TechThermostat(zones[zone], coordinator, config_entry) for zone in zones
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tech/climate.py", line 69, in __init__
    if not self._config_entry.data[INCLUDE_HUB_IN_NAME]
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'include_hub_in_name'
2024-05-07 10:58:57.561 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up tech platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/tech/sensor.py", line 87, in async_setup_entry
    TileTemperatureSignalSensor(
  File "/config/custom_components/tech/sensor.py", line 1182, in __init__
    TileSensor.__init__(self, device, coordinator, config_entry)
  File "/config/custom_components/tech/entity.py", line 38, in __init__
    if self._config_entry.data[INCLUDE_HUB_IN_NAME]:
       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'include_hub_in_name'

Additional information

No response

@daroga0002 daroga0002 added bug Something isn't working triage Newly opened issues or features that are not yet confirmed labels May 7, 2024
@daroga0002
Copy link
Contributor Author

@anarion80 I think upgrade failed becuase INCLUDE_HUB_IN_NAME is not filled and config flow doesnt require to triggered again as I dont adding new integration so this default value is not passed into whole object:

what you think?

@daroga0002 daroga0002 changed the title [Bug]: after upgrade to 2.3.0 [Bug]: upgrade to 2.3.0 failing May 7, 2024
@anarion80
Copy link
Collaborator

anarion80 commented May 7, 2024

Yes, I was too quick with the release and forgot to remove the migrations. They are too complex anyway and don't account for the latest change. So the release notes will need a statement that migration is not supported and we need to remove the integration and add again. With no migration all looks correct in testing.

anarion80 added a commit that referenced this issue May 7, 2024
anarion80 added a commit that referenced this issue May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Newly opened issues or features that are not yet confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants