-
Notifications
You must be signed in to change notification settings - Fork 43
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
Integration Crash After Kernel Upgrade to 2024.12.0 - AttributeError in Versatile Thermostat Component #702
Comments
Hello I'm currenlty on 2024.12.1 without any issue. I will try to understand what happens. If someone have an idea... Can you please give me the attributes of the underlying climate ? |
Hello JmCollin, Thank you for your help! The underlying thermostat is actually a Daikin air conditioner, controllable via the daikin_onecta integration. I hadn’t encountered any issues with it until an update two days ago. Since then, I’ve noticed the same type of error as with Versatile, and I can no longer control the air conditioner through Home Assistant. By reverting to the previous version of daikin_onecta, the problem disappeared. I’ll report this issue to them as well. For reference, here are the current state attributes of the air conditioner: hvac_modes:
- "off"
- heat_cool
- dry
- cool
- heat
- fan_only
min_temp: 10
max_temp: 30
target_temp_step: 0.5
fan_modes:
- quiet
- auto
- "1"
- "2"
- "3"
- "4"
- "5"
preset_modes:
- away
- boost
- none
swing_modes:
- stop
- swing
swing_horizontal_modes:
- stop
- swing
current_temperature: 18
temperature: 16
fan_mode: quiet
preset_mode: none
swing_mode: stop
swing_horizontal_mode: stop
icon: mdi:air-conditioner
friendly_name: Climatisation Chambre
supported_features: 953 Do you think there’s anything else I can provide or do to help? |
Small clarification, I did try downgrading the version of Versatile to 6.7.0, but the error is still present. |
Hello @Rominic , I think swing_horizontal_mode is new attributes in climate entities. Because your device seems to support it ( I will have to add it. |
That is why: https://developers.home-assistant.io/blog/2024/12/03/climate-horizontal-swing At each major release of HA, there is breaking change on Thermostat which are not mentionned. This is very annoying. |
Co-authored-by: Jean-Marc Collin <[email protected]>
Can you try this and let me know if it fixes the issue. Thank you. |
Bonjour, cela ne fonctionne toujours pas mais maintenant j'ai 2 erreur : Cette erreur provient d'une intégration personnalisée Enregistreur: py.warnings /config/custom_components/versatile_thermostat/underlyings.py:255: RuntimeWarning: coroutine 'UnderlyingEntity.set_hvac_mode' was never awaited super().set_hvac_mode(hvac_mode) et Cette erreur provient d'une intégration personnalisée Enregistreur: custom_components.versatile_thermostat.base_thermostat No previously saved temperature, setting to 7.0 |
Hello, If i rollback daikin_onecta prior to the addition of the new horizontal swing attribute (v4.1.22) it works again. Best regards, First message is new, i only saw it once.
|
So unfortunately, as Maabou08 explains, the issue is not resolved, and I have the following errors in the logs : 2024-12-15 00:32:14.324 WARNING (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Thermostat chambre - Undefined target temperature, falling back to 28.0
2024-12-15 00:32:14.326 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Thermostat chambre for versatile_thermostat
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/versatile_thermostat/__init__.py", line 183, in async_setup_entry
await api.init_vtherm_links(entry.entry_id)
File "/config/custom_components/versatile_thermostat/vtherm_api.py", line 189, in init_vtherm_links
await entity.async_startup(self.find_central_configuration())
File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 737, in async_startup
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 2702, in async_write_ha_state
return super().async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1081, in __async_calculate_state
capability_attr = self.capability_attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 530, in capability_attributes
data[ATTR_SWING_HORIZONTAL_MODES] = self.swing_horizontal_modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "src/propcache/_helpers_c.pyx", line 80, in propcache._helpers_c.cached_property.__get__
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 727, in swing_horizontal_modes
return self._attr_swing_horizontal_modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
AttributeError: 'ThermostatOverClimate' object has no attribute '__attr_swing_horizontal_modes'. Did you mean: '_attr_swing_horizontal_modes'?
2024-12-15 00:32:51.974 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140209138797728] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
hass, entity, func, data, call.context
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 1084, in async_service_temperature_set
await entity.async_set_temperature(**kwargs)
File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 1453, in async_set_temperature
self.recalculate()
~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 581, in recalculate
self.update_custom_attributes()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 567, in update_custom_attributes
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 2702, in async_write_ha_state
return super().async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1081, in __async_calculate_state
capability_attr = self.capability_attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 530, in capability_attributes
data[ATTR_SWING_HORIZONTAL_MODES] = self.swing_horizontal_modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "src/propcache/_helpers_c.pyx", line 80, in propcache._helpers_c.cached_property.__get__
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 727, in swing_horizontal_modes
return self._attr_swing_horizontal_modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
AttributeError: 'ThermostatOverClimate' object has no attribute '__attr_swing_horizontal_modes'. Did you mean: '_attr_swing_horizontal_modes'?
2024-12-15 00:33:00.486 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 895, in _async_climate_changed
await end_climate_changed(changes)
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 651, in end_climate_changed
self.update_custom_attributes()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 567, in update_custom_attributes
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 2702, in async_write_ha_state
return super().async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1081, in __async_calculate_state
capability_attr = self.capability_attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 530, in capability_attributes
data[ATTR_SWING_HORIZONTAL_MODES] = self.swing_horizontal_modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "src/propcache/_helpers_c.pyx", line 80, in propcache._helpers_c.cached_property.__get__
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 727, in swing_horizontal_modes
return self._attr_swing_horizontal_modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
AttributeError: 'ThermostatOverClimate' object has no attribute '__attr_swing_horizontal_modes'. Did you mean: '_attr_swing_horizontal_modes'?
2024-12-15 00:33:00.489 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 895, in _async_climate_changed
await end_climate_changed(changes)
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 651, in end_climate_changed
self.update_custom_attributes()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 567, in update_custom_attributes
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 2702, in async_write_ha_state
return super().async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1081, in __async_calculate_state
capability_attr = self.capability_attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 530, in capability_attributes
data[ATTR_SWING_HORIZONTAL_MODES] = self.swing_horizontal_modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "src/propcache/_helpers_c.pyx", line 80, in propcache._helpers_c.cached_property.__get__
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 727, in swing_horizontal_modes
return self._attr_swing_horizontal_modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
AttributeError: 'ThermostatOverClimate' object has no attribute '__attr_swing_horizontal_modes'. Did you mean: '_attr_swing_horizontal_modes'?
2024-12-15 00:33:25.533 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 1555, in _async_ext_temperature_changed
self.recalculate()
~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 581, in recalculate
self.update_custom_attributes()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 567, in update_custom_attributes
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 2702, in async_write_ha_state
return super().async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1081, in __async_calculate_state
capability_attr = self.capability_attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 530, in capability_attributes
data[ATTR_SWING_HORIZONTAL_MODES] = self.swing_horizontal_modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "src/propcache/_helpers_c.pyx", line 80, in propcache._helpers_c.cached_property.__get__
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 727, in swing_horizontal_modes
return self._attr_swing_horizontal_modes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 337, in __getattribute__
return super().__getattribute__(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
AttributeError: 'ThermostatOverClimate' object has no attribute '__attr_swing_horizontal_modes'. Did you mean: '_attr_swing_horizontal_modes'?``` |
Same issue here on a new install (only just started using versatile thermostat), also Daikin. |
Hello all, Because I cannot reproduce on my env, it is not easy to fix. Does someone have the skill to make a PR and fix the issue directly on your env ? I would be glad to merge it quickly. |
I can make the changes locally to test it if you can give me an idea where to add the lines as proposed by sbeaudion. |
I would love it @VederJay ! |
I have posted a message on the core thread. |
Hello, I made a 2nd try to fix this issue in this beta release: https://github.com/jmcollin78/versatile_thermostat/releases/tag/6.8.4.beta1 Please give it a try and let me know. |
Bonjour version 6.8.4 beta 2 installée je n'ai plus d'erreur pour l'instant et cela a l'air de fonctionne correctement merci beaucoup pour votre belle application, et surtout d'avoir pris le temps de corrige rapidement votre application. encore MERCI |
Elle sera donc dans la prochaine release. Merci pour le retour. |
Hello,
After upgrading to kernel version 2024.12.0 and the subsequent versions up to 2024.12.2, the integration started to crash. This issue seems similar to the problems reported in the following threads:
claudegel/sinope-gt125#71
home-assistant/core#132437
Configuration
Core: 2024.12.2
Supervisor: 2024.11.4
Operating System: 14.0
Frontend: 20241127.6
Versatile thermostat: 6.8.2
My VTherm attributes are the following:
Describe the bug
After upgrading to kernel version 2024.12.0 and subsequent versions up to 2024.12.2, the integration crashes. The issue appears to be related to a change in how certain attributes are accessed or initialized, as seen in the error trace below.
Debug log
Additional Information
Error encountered: AttributeError: 'ThermostatOverClimate' object has no attribute '__attr_swing_horizontal_mode'
The text was updated successfully, but these errors were encountered: