Skip to content

Commit

Permalink
* Fix switchoff sensor warning and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BenPru committed Oct 29, 2023
1 parent 272d692 commit 3c40dca
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
20 changes: 18 additions & 2 deletions custom_components/luxtronik/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,12 @@ class FirmwareVersionMinor(Enum):
DOWNLOAD_PORTAL_URL: Final = (
"https://www.heatpump24.com/software/fetchSoftware.php?softwareID="
)
FIRMWARE_UPDATE_MANUAL_EN = "https://www.alpha-innotec.com/en/services/customer-support/software-center"
FIRMWARE_UPDATE_MANUAL_DE = "https://www.alpha-innotec.com/de/services/kundendienst/software-center"
FIRMWARE_UPDATE_MANUAL_EN = (
"https://www.alpha-innotec.com/en/services/customer-support/software-center"
)
FIRMWARE_UPDATE_MANUAL_DE = (
"https://www.alpha-innotec.com/de/services/kundendienst/software-center"
)
# endregion Constants Main

# region Conf
Expand Down Expand Up @@ -195,7 +199,15 @@ class LuxSwitchoffReason(Enum):
minimal_usage_temperature: Final = 7
lower_usage_limit: Final = 8
no_request: Final = 9
undefined_10: Final = 10 # ???
flow_rate: Final = 11 # Durchfluss
undefined_12: Final = 12 # ???
undefined_13: Final = 13 # ???
undefined_14: Final = 14 # ???
undefined_15: Final = 15 # ???
undefined_16: Final = 16 # ???
undefined_17: Final = 17 # ???
undefined_18: Final = 18 # ???
PV_max: Final = 19


Expand Down Expand Up @@ -455,6 +467,8 @@ class LuxCalculation(StrEnum):
C0180_HIGH_PRESSURE: Final = "calculations.ID_WEB_LIN_HD"
C0181_LOW_PRESSURE: Final = "calculations.ID_WEB_LIN_ND"
C0182_COMPRESSOR_HEATER: Final = "calculations.ID_WEB_LIN_VDH_out"
# C0187_CURRENT_OUTPUT: Final = "calculations.ID_WEB_SEC_Qh_Soll"
# C0188_CURRENT_OUTPUT: Final = "calculations.ID_WEB_SEC_Qh_Ist"
C0204_HEAT_SOURCE_INPUT_TEMPERATURE: Final = "calculations.ID_WEB_Temperatur_TWE"
C0227_ROOM_THERMOSTAT_TEMPERATURE: Final = "calculations.ID_WEB_RBE_RT_Ist"
C0228_ROOM_THERMOSTAT_TEMPERATURE_TARGET: Final = "calculations.ID_WEB_RBE_RT_Soll"
Expand All @@ -468,7 +482,9 @@ class LuxCalculation(StrEnum):
# 242: Kelvin("HUP_Temp_Spread_Soll"), / 10, measurement, delta - ait_hup_delta_calculated
C0243_CIRCULATION_PUMP_DELTA: Final = "calculations.Unknown_Calculation_243"
# 243: Kelvin("HUP_Temp_Spread_Ist"), / 10, measurement, delta - ait_hup_delta
# 254 Flow Rate
C0257_CURRENT_HEAT_OUTPUT: Final = "calculations.Heat_Output"
# 258 RBE Version


# endregion Lux calculations
Expand Down
2 changes: 1 addition & 1 deletion custom_components/luxtronik/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"after_dependencies": [],
"codeowners": ["@BenPru"],
"iot_class": "local_polling",
"version": "2023.10.28",
"version": "2023.10.29",
"homeassistant": "2023.1.0",
"dhcp": [
{ "macaddress": "000E8C*" },
Expand Down
4 changes: 1 addition & 3 deletions custom_components/luxtronik/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,7 @@ def _handle_coordinator_update(
attr[SA.TIMESTAMP + f"_{i}"] = self.format_time(item[0])
i += 1

super()._handle_coordinator_update(
data, self.entity_description.luxtronik_key.format(ID=0)
)
self.async_write_ha_state()

def format_time(self, value_timestamp: int | None) -> datetime | None:
if value_timestamp is not None and isinstance(value_timestamp, int):
Expand Down
16 changes: 0 additions & 16 deletions custom_components/luxtronik/sensor_entities_predefined.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,22 +443,6 @@
attr(SA.REMEDY, LC.C0100_ERROR_REASON),
],
),
# TODO:
# LuxtronikIndexStatusSensor(
# key_index=None,
# key_timestamp_template=None,
# luxtronik=luxtronik,
# device_info=device_info,
# sensor_key="Switchoff",
# unique_id="switchoff_reason",
# name="Switchoff Reason",
# icon="mdi:electric-switch",
# translation_key="switchoff_reason",
# unit_of_measurement=None,
# state_class=None,
# device_class=None,
# extra_value_attributes=["code"],
# ),
# endregion Main heatpump
# region Heating
descr(
Expand Down

0 comments on commit 3c40dca

Please sign in to comment.