jmcollin78 / versatile_thermostat

A full featured Thermostat for Home Assistant: presets, window, motion, presence and overpowering management
MIT License
289 stars 27 forks source link

AttributeError: 'ThermostatOverClimate' object has no attribute '__attr_preset_modes'. Did you mean: '__attr_preset_mode'? #428

Closed jmcollin78 closed 6 months ago

jmcollin78 commented 6 months ago

Discussed in https://github.com/jmcollin78/versatile_thermostat/discussions/427

Originally posted by **edouardkleinhans** March 25, 2024 Hello, I try to use versatile_thermostat over Drayton wiser climate and I have this kind of error in log Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 865, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1327, in add_to_platform_finish await self.async_added_to_hass() File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 452, in async_added_to_hass await super().async_added_to_hass() File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 631, in async_added_to_hass await self.async_startup() File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 782, in async_startup await _async_startup_internal() File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 759, in _async_startup_internal await self._async_update_presence(presence_state.state) File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 1796, in _async_update_presence self.recalculate() File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 552, in recalculate self.update_custom_attributes() File "/config/custom_components/versatile_thermostat/thermostat_climate.py", line 539, in update_custom_attributes self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 992, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1113, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.__async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1045, in __async_calculate_state capability_attr = self.capability_attributes ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 322, in __getattribute__ return super().__getattribute__(__name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 451, in capability_attributes data[ATTR_PRESET_MODES] = self.preset_modes ^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 322, in __getattribute__ return super().__getattribute__(__name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/versatile_thermostat/base_thermostat.py", line 1120, in preset_modes return self._attr_preset_modes ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 322, in __getattribute__ return super().__getattribute__(__name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 345, in _getter return getattr(o, private_attr_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 322, in __getattribute__ return super().__getattribute__(__name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ThermostatOverClimate' object has no attribute '__attr_preset_modes'. Did you mean: '__attr_preset_mode' ? Any idea ?
jmcollin78 commented 6 months ago

https://github.com/jmcollin78/versatile_thermostat/releases/tag/6.1.0