mypyllant-component icon indicating copy to clipboard operation
mypyllant-component copied to clipboard

Die Aktion water_heater/set_operation_mode konnte nicht ausgeführt werden. 'NoneType' object has no attribute 'general'

Open easyhoo opened this issue 11 months ago • 0 comments
trafficstars

Before submitting a new issue

Problem description

Beim Versuch die Vaillant Geräte zu schalten kommt seit dem jüngsten HA Upgrade diese NoneType Meldung. Die Aktion water_heater/set_operation_mode konnte nicht ausgeführt werden. 'NoneType' object has no attribute 'general'

Logs

AttributeError: 'NoneType' object has no attribute 'general'
2024-12-03 12:42:14.147 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140594XXX658848] 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(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/water_heater/__init__.py", line 359, in async_handle_set_operation_mode
    await self.async_set_operation_mode(operation_mode)
  File "/config/custom_components/mypyllant/water_heater.py", line 255, in async_set_operation_mode
    await self.coordinator.async_request_refresh_delayed()
  File "/config/custom_components/mypyllant/coordinator.py", line 91, in async_request_refresh_delayed
    self.async_set_updated_data(self.data)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 517, in async_set_updated_data
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 176, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 561, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1007, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1073, in __async_calculate_state
    if extra_state_attributes := self.extra_state_attributes:
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mypyllant/utils.py", line 136, in extra_state_attributes
    if self.zone.general.holiday_remaining
       ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'general'
2024-12-03 12:42:56.849 DEBUG (MainThread) [custom_components.mypyllant.coordinator] Manually updated myVAILLANT data
2024-12-03 12:42:56.851 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [14059XXXX658848] 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(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/water_heater/__init__.py", line 359, in async_handle_set_operation_mode
    await self.async_set_operation_mode(operation_mode)
  File "/config/custom_components/mypyllant/water_heater.py", line 255, in async_set_operation_mode
    await self.coordinator.async_request_refresh_delayed()
  File "/config/custom_components/mypyllant/coordinator.py", line 91, in async_request_refresh_delayed
    self.async_set_updated_data(self.data)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 517, in async_set_updated_data
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 176, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 561, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1007, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1073, in __async_calculate_state
    if extra_state_attributes := self.extra_state_attributes:
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mypyllant/utils.py", line 136, in extra_state_attributes
    if self.zone.general.holiday_remaining
       ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'general'

easyhoo avatar Dec 03 '24 11:12 easyhoo