diff --git a/custom_components/luxtronik/base.py b/custom_components/luxtronik/base.py index 18849ea..da39ad3 100644 --- a/custom_components/luxtronik/base.py +++ b/custom_components/luxtronik/base.py @@ -6,7 +6,6 @@ from typing import Any from enum import StrEnum -from homeassistant.components.sensor import RestoreSensor from homeassistant.components.water_heater import STATE_HEAT_PUMP from homeassistant.const import STATE_OFF, UnitOfTemperature, UnitOfTime from homeassistant.core import callback diff --git a/custom_components/luxtronik/climate.py b/custom_components/luxtronik/climate.py index b232b0f..7e801ce 100644 --- a/custom_components/luxtronik/climate.py +++ b/custom_components/luxtronik/climate.py @@ -317,10 +317,10 @@ async def async_set_temperature(self, **kwargs: Any) -> None: async def async_turn_off(self) -> None: await self.async_set_hvac_mode(HVACMode.OFF) - + async def async_turn_on(self) -> None: await self.async_set_hvac_mode(HVACMode[self.entity_description.hvac_mode_mapping[LuxMode.automatic.value].upper()]) - + async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: """Set new target hvac mode.""" self._attr_hvac_mode = hvac_mode diff --git a/custom_components/luxtronik/const.py b/custom_components/luxtronik/const.py index dc0610e..4cc64f1 100644 --- a/custom_components/luxtronik/const.py +++ b/custom_components/luxtronik/const.py @@ -289,7 +289,7 @@ class LuxParameter(StrEnum): P0019_HEATING_CURVE_CIRCUIT2_NIGHT_TEMPERATURE: Final = ( "parameters.ID_Einst_HzMK2ABS_akt" # 0 ) - # luxtronik*_heating_curve_circuit3* + # luxtronik*_heating_curve_circuit3* P0020_HEATING_CURVE_CIRCUIT3_END_TEMPERATURE: Final = ( "parameters.ID_Einst_HzMK3E_akt" # 270 ) @@ -631,7 +631,7 @@ class SensorKey(StrEnum): ADDITIONAL_HEAT_GENERATOR_AMOUNT_COUNTER = ( "additional_heat_generator_amount_counter" ) - SECOND_HEAT_GENERATOR_AMOUNT_COUNTER= "second_heat_generator_amount_counter" + SECOND_HEAT_GENERATOR_AMOUNT_COUNTER = "second_heat_generator_amount_counter" ANALOG_OUT1 = "analog_out1" ANALOG_OUT2 = "analog_out2" CURRENT_HEAT_OUTPUT = "current_heat_output" diff --git a/custom_components/luxtronik/coordinator.py b/custom_components/luxtronik/coordinator.py index dbc53f4..d1fa1c6 100644 --- a/custom_components/luxtronik/coordinator.py +++ b/custom_components/luxtronik/coordinator.py @@ -339,7 +339,7 @@ def entity_visible(self, description: LuxtronikEntityDescription) -> bool: if description.visibility == LV.V0059A_DHW_CHARGING_PUMP: return not self._detect_dhw_circulation_pump_present() if description.visibility == LV.V0005_COOLING: - return self.detect_cooling_present() + return self.detect_cooling_present() visibility_result = self.get_value(description.visibility) if visibility_result is None: LOGGER.warning("Could not load visibility %s", description.visibility) @@ -369,7 +369,7 @@ def entity_active(self, description: LuxtronikEntityDescription) -> bool: LV.V0039_SOLAR_BUFFER, LV.V0250_SOLAR, ]: - return self._detect_solar_present() + return self._detect_solar_present() if not self.device_key_active(description.device_key): return False diff --git a/custom_components/luxtronik/lux_helper.py b/custom_components/luxtronik/lux_helper.py index ea36081..b45890a 100644 --- a/custom_components/luxtronik/lux_helper.py +++ b/custom_components/luxtronik/lux_helper.py @@ -5,9 +5,6 @@ import socket import struct import threading -import time - -from async_timeout import timeout from luxtronik.calculations import Calculations from luxtronik.parameters import Parameters diff --git a/custom_components/luxtronik/model.py b/custom_components/luxtronik/model.py index b60ffb4..41d7ea8 100644 --- a/custom_components/luxtronik/model.py +++ b/custom_components/luxtronik/model.py @@ -199,4 +199,3 @@ class LuxtronikUpdateEntityDescription( device_class = UpdateDeviceClass.FIRMWARE platform = Platform.UPDATE - diff --git a/custom_components/luxtronik/number_entities_predefined.py b/custom_components/luxtronik/number_entities_predefined.py index f01c3bf..5cea614 100644 --- a/custom_components/luxtronik/number_entities_predefined.py +++ b/custom_components/luxtronik/number_entities_predefined.py @@ -98,7 +98,7 @@ icon="mdi:download-lock", device_class=SensorDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, - native_min_value=-20.0, # -9.0 + native_min_value=-20.0, # -9.0 native_max_value=0.0, native_step=0.5, entity_category=EntityCategory.CONFIG, @@ -535,7 +535,7 @@ entity_category=EntityCategory.CONFIG, mode=NumberMode.BOX, visibility=LV.V0005_COOLING, - ), + ), LuxtronikNumberDescription( key=SensorKey.COOLING_START_DELAY_HOURS, luxtronik_key=LP.P0850_COOLING_START_DELAY_HOURS, @@ -575,7 +575,7 @@ entity_category=EntityCategory.CONFIG, mode=NumberMode.BOX, visibility=LP.P0042_MIXING_CIRCUIT1_TYPE, - ), + ), LuxtronikNumberDescription( key=SensorKey.COOLING_TARGET_TEMPERATURE_MK2, luxtronik_key=LP.P0133_COOLING_TARGET_TEMPERATURE_MK2, @@ -589,7 +589,7 @@ entity_category=EntityCategory.CONFIG, mode=NumberMode.BOX, visibility=LP.P0130_MIXING_CIRCUIT2_TYPE, - ), + ), LuxtronikNumberDescription( key=SensorKey.COOLING_TARGET_TEMPERATURE_MK3, luxtronik_key=LP.P0966_COOLING_TARGET_TEMPERATURE_MK3, @@ -603,7 +603,6 @@ entity_category=EntityCategory.CONFIG, mode=NumberMode.BOX, visibility=LP.P0780_MIXING_CIRCUIT3_TYPE, - ), + ), # endregion Cooling ] -