Skip to content

Commit

Permalink
fixed linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
toggm committed Nov 16, 2024
1 parent 5f2a59d commit 25d384f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 17 deletions.
1 change: 0 additions & 1 deletion custom_components/luxtronik/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions custom_components/luxtronik/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions custom_components/luxtronik/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions custom_components/luxtronik/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions custom_components/luxtronik/lux_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion custom_components/luxtronik/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,3 @@ class LuxtronikUpdateEntityDescription(

device_class = UpdateDeviceClass.FIRMWARE
platform = Platform.UPDATE

11 changes: 5 additions & 6 deletions custom_components/luxtronik/number_entities_predefined.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -603,7 +603,6 @@
entity_category=EntityCategory.CONFIG,
mode=NumberMode.BOX,
visibility=LP.P0780_MIXING_CIRCUIT3_TYPE,
),
),
# endregion Cooling
]

0 comments on commit 25d384f

Please sign in to comment.