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

Unable to set target temperature #32

Open
4 tasks done
chappers00 opened this issue Mar 15, 2024 · 1 comment
Open
4 tasks done

Unable to set target temperature #32

chappers00 opened this issue Mar 15, 2024 · 1 comment

Comments

@chappers00
Copy link
Collaborator

System Health details

As per previous issues

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

When my heat pump turns on Optispark crashes with the logs shown below. Also this error is in the logs:

This error originated from a custom integration.

Logger: custom_components.optispark
Source: helpers/update_coordinator.py:318
integration: Optispark (documentation, issues)
First occurred: 3:44:49 PM (1 occurrences)
Last logged: 3:44:49 PM

Unexpected error fetching optispark data: 'LGEACClimate' object has no attribute '__attr_target_temperature_low'
Traceback (most recent call last):
File "/config/custom_components/optispark/coordinator.py", line 135, in update_heat_pump_temperature
if self.heat_pump_target_temperature == temp:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/optispark/coordinator.py", line 213, in heat_pump_target_temperature
temperature = climate_entity.target_temperature_low
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 322, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/backports/functools.py", line 70, in get
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 571, in target_temperature_low
return self._attr_target_temperature_low
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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: 'LGEACClimate' object has no attribute '__attr_target_temperature_low'. Did you mean: '_attr_target_temperature_low'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/optispark/coordinator.py", line 289, in _async_update_data
await self.update_heat_pump_temperature(data)
File "/config/custom_components/optispark/coordinator.py", line 147, in update_heat_pump_temperature
raise OptisparkSetTemperatureError(err)
custom_components.optispark.coordinator.OptisparkSetTemperatureError: 'LGEACClimate' object has no attribute '__attr_target_temperature_low'

Reproduction steps

  1. Install optispark
  2. Turn on air conditioning heat pump

...

Debug logs

This error originated from a custom integration.

Logger: custom_components.optispark
Source: custom_components/optispark/coordinator.py:146
integration: Optispark (documentation, issues)
First occurred: 3:44:49 PM (1 occurrences)
Last logged: 3:44:49 PM

Traceback (most recent call last): File "/config/custom_components/optispark/coordinator.py", line 135, in update_heat_pump_temperature if self.heat_pump_target_temperature == temp: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/optispark/coordinator.py", line 213, in heat_pump_target_temperature temperature = climate_entity.target_temperature_low ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 322, in __getattribute__ return super().__getattribute__(__name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/backports/functools.py", line 70, in __get__ val = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 571, in target_temperature_low return self._attr_target_temperature_low ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: 'LGEACClimate' object has no attribute '__attr_target_temperature_low'. Did you mean: '_attr_target_temperature_low'?

Diagnostics dump

No response

@Big-Tree
Copy link
Owner

Thanks for reporting that, should be fixed now, with an update and a restart.

I had interpreted the climate entity documentation incorrectly:
https://developers.home-assistant.io/docs/core/entity/climate/#supported-features

The LG Smartthinq integration implements the heat/cool function, but not the TARGET_TEMPERATURE_RANGE, which previously I thought wasn't possible.

I'm guessing you've recently swapped to integration from heating mode to heat/cool.

See commit - 00f09fb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants