Skip to content

Commit

Permalink
Added
Browse files Browse the repository at this point in the history
* disturbance_output (calculations.ID_WEB_ZW2SSTout)
* operation_hours_compressor1 (calculations.ID_WEB_Zaehler_BetrZeitVD1)
* operation_hours_compressor2 (calculations.ID_WEB_Zaehler_BetrZeitVD2)
* compressor_impulses2 (calculations.ID_WEB_Zaehler_BetrZeitImpVD2)
* switchoff_reason (Switchoff)
* error_reason (calculations.ID_WEB_ERROR_Nr0)
* Attribute max_allowed in flow_in_temperature

Changed
* Detection: Use visibility id for additional_heat_generator_amount_counter, flow_out_temperature_external

Fixed
* Wrong device_class in high_pressure, low_pressure, pump_frequency
  • Loading branch information
BenPru committed Jan 15, 2023
1 parent defda98 commit 68357b3
Show file tree
Hide file tree
Showing 9 changed files with 568 additions and 50 deletions.
15 changes: 14 additions & 1 deletion custom_components/luxtronik/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import voluptuous as vol
from homeassistant.components.binary_sensor import (DEVICE_CLASS_LOCK,
DEVICE_CLASS_OPENING,
DEVICE_CLASS_PROBLEM,
DEVICE_CLASS_RUNNING,
PLATFORM_SCHEMA,
BinarySensorEntity)
Expand Down Expand Up @@ -146,7 +147,7 @@ async def async_setup_entry(

deviceInfo = hass.data[f"{DOMAIN}_DeviceInfo"]

# Build Sensor names with local language:
# region: Build Sensor names with local language:
lang = hass.config.language
text_evu_unlocked = get_sensor_text(lang, "evu_unlocked")
text_compressor = get_sensor_text(lang, "compressor")
Expand All @@ -158,6 +159,7 @@ async def async_setup_entry(
text_compressor_heater = get_sensor_text(lang, "compressor_heater")
text_additional_heat_generator = get_sensor_text(lang, "additional_heat_generator")
text_defrost_valve = get_sensor_text(lang, "defrost_valve")
# endregion: Build Sensor names with local language:

entities = [
LuxtronikBinarySensor(
Expand Down Expand Up @@ -217,6 +219,15 @@ async def async_setup_entry(
icon="mdi:patio-heater",
device_class=DEVICE_CLASS_RUNNING,
),
LuxtronikBinarySensor(
luxtronik=luxtronik,
deviceInfo=deviceInfo,
sensor_key='calculations.ID_WEB_ZW2SSTout',
unique_id="disturbance_output",
name="Disturbance output",
icon="mdi:patio-heater",
device_class=DEVICE_CLASS_PROBLEM,
),

# calculations.ID_WEB_ASDin Soledruck ausreichend
# calculations.ID_WEB_HDin Hochdruck OK
Expand Down Expand Up @@ -366,6 +377,8 @@ def icon(self): # -> str | None:
"""Return the icon to be used for this entity."""
if not self.is_on and self._icon_off is not None:
return self._icon_off
if self._attr_icon is None:
super().icon
return self._attr_icon

def update(self):
Expand Down
5 changes: 5 additions & 0 deletions custom_components/luxtronik/recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@ def exclude_attributes(hass: HomeAssistant) -> set[str]:
'EVU second start time',
'EVU second end time',
'EVU minutes until next event',
'timestamp',
'code',
'cause',
'remedy',
'max_allowed'
}
Loading

0 comments on commit 68357b3

Please sign in to comment.