-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
* Compressor (calculations.ID_WEB_VD1out) * Circulating_pump_domestic_water (calculations.ID_WEB_ZIPout) * Circulating_pump_heating (calculations.ID_WEB_ZUPout) * Circulating_pump_water (calculations.ID_WEB_BUPout) * Unloading_pump (calculations.ID_WEB_HUPout) Add new sensors: * Overheating_temperature (calculations.ID_WEB_LIN_UH) * Overheating_target_temperature (calculations.ID_WEB_LIN_UH_Soll) * High_pressure (calculations.ID_WEB_LIN_HD) * Low_pressure (calculations.ID_WEB_LIN_ND) Add new config params: * PUMP_OPTIMIZATION (parameters.ID_Einst_Popt_akt) * PUMP_OPTIMIZATION_TIME (parameters.ID_Einst_Popt_Nachlauf_akt) * Pump_heat_control (parameters.ID_Einst_P155_PumpHeatCtrl) * MAXIMUM_CIRCULATION_PUMP_SPEED (parameters.ID_Einst_P155_PumpHeat_Max) * EFFICIENCY_PUMP (parameters.ID_Einst_Effizienzpumpe_akt) * Heating_room_temperature_impact_factor (parameters.ID_RBE_Einflussfaktor_RT_akt) Create room thermostat temperature only if it is activated (parameters.ID_RBE_Einflussfaktor_RT_akt) Simplify temperature names.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,38 +4,32 @@ | |
|
||
import homeassistant.helpers.config_validation as cv | ||
import voluptuous as vol | ||
from homeassistant.components.binary_sensor import ( | ||
DEVICE_CLASS_LOCK, | ||
DEVICE_CLASS_RUNNING, | ||
PLATFORM_SCHEMA, | ||
BinarySensorEntity, | ||
) | ||
from homeassistant.components.binary_sensor import (DEVICE_CLASS_LOCK, | ||
DEVICE_CLASS_RUNNING, | ||
PLATFORM_SCHEMA, | ||
BinarySensorEntity) | ||
from homeassistant.components.sensor import ENTITY_ID_FORMAT | ||
from homeassistant.config_entries import ConfigEntry | ||
from homeassistant.const import CONF_FRIENDLY_NAME, CONF_ICON, CONF_ID, CONF_SENSORS, ENTITY_CATEGORIES | ||
from homeassistant.const import (CONF_FRIENDLY_NAME, CONF_ICON, CONF_ID, | ||
CONF_SENSORS, ENTITY_CATEGORIES) | ||
from homeassistant.core import HomeAssistant | ||
from homeassistant.helpers.entity import DeviceInfo | ||
from homeassistant.helpers.entity_platform import AddEntitiesCallback | ||
from homeassistant.helpers.restore_state import RestoreEntity | ||
from homeassistant.helpers.typing import ConfigType | ||
from homeassistant.util import slugify | ||
|
||
from .const import ( | ||
CONF_CALCULATIONS, | ||
CONF_GROUP, | ||
CONF_INVERT_STATE, | ||
CONF_LANGUAGE_SENSOR_NAMES, | ||
CONF_PARAMETERS, | ||
CONF_VISIBILITIES, | ||
DEFAULT_DEVICE_CLASS, | ||
DEVICE_CLASSES, | ||
DOMAIN, | ||
LOGGER, | ||
LUX_BINARY_SENSOR_EVU_UNLOCKED, | ||
LUX_BINARY_SENSOR_SOLAR_PUMP, | ||
) | ||
from .helpers.helper import get_sensor_text | ||
from .luxtronik_device import LuxtronikDevice | ||
from custom_components.luxtronik.const import (CONF_CALCULATIONS, CONF_GROUP, | ||
CONF_INVERT_STATE, | ||
CONF_LANGUAGE_SENSOR_NAMES, | ||
CONF_PARAMETERS, | ||
CONF_VISIBILITIES, | ||
DEFAULT_DEVICE_CLASS, | ||
DEVICE_CLASSES, DOMAIN, LOGGER, | ||
LUX_BINARY_SENSOR_EVU_UNLOCKED, | ||
LUX_BINARY_SENSOR_SOLAR_PUMP) | ||
from custom_components.luxtronik.helpers.helper import get_sensor_text | ||
from custom_components.luxtronik.luxtronik_device import LuxtronikDevice | ||
|
||
# endregion Imports | ||
|
||
|
@@ -154,6 +148,12 @@ async def async_setup_entry( | |
# Build Sensor names with local language: | ||
lang = config_entry.options.get(CONF_LANGUAGE_SENSOR_NAMES) | ||
text_evu_unlocked = get_sensor_text(lang, "evu_unlocked") | ||
text_compressor = get_sensor_text(lang, "compressor") | ||
text_circulating_pump_domestic_water = get_sensor_text(lang, "circulating_pump_domestic_water") | ||
text_circulating_pump_heating = get_sensor_text(lang, "circulating_pump_heating") | ||
text_circulating_pump_water = get_sensor_text(lang, "circulating_pump_water") | ||
text_unloading_pump = get_sensor_text(lang, "unloading_pump") | ||
|
||
entities = [ | ||
LuxtronikBinarySensor( | ||
hass=hass, | ||
|
@@ -164,9 +164,75 @@ async def async_setup_entry( | |
name=text_evu_unlocked, | ||
icon="mdi:lock", | ||
device_class=DEVICE_CLASS_LOCK, | ||
) | ||
), | ||
LuxtronikBinarySensor( | ||
hass=hass, | ||
luxtronik=luxtronik, | ||
deviceInfo=deviceInfo, | ||
sensor_key='calculations.ID_WEB_VD1out', | ||
unique_id="compressor", | ||
name=text_compressor, | ||
icon="mdi:heat-pump", | ||
device_class=DEVICE_CLASS_RUNNING, | ||
), | ||
LuxtronikBinarySensor( | ||
hass=hass, | ||
luxtronik=luxtronik, | ||
deviceInfo=deviceInfo, | ||
sensor_key='calculations.ID_WEB_ZIPout', | ||
unique_id="circulating_pump_domestic_water", | ||
name=text_circulating_pump_domestic_water, | ||
icon="mdi:pump", | ||
device_class=DEVICE_CLASS_RUNNING, | ||
), | ||
LuxtronikBinarySensor( | ||
hass=hass, | ||
luxtronik=luxtronik, | ||
deviceInfo=deviceInfo, | ||
sensor_key='calculations.ID_WEB_ZUPout', | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
BenPru
Author
Owner
|
||
unique_id="circulating_pump_heating", | ||
name=text_circulating_pump_heating, | ||
icon="mdi:pump", | ||
device_class=DEVICE_CLASS_RUNNING, | ||
), | ||
LuxtronikBinarySensor( | ||
hass=hass, | ||
luxtronik=luxtronik, | ||
deviceInfo=deviceInfo, | ||
sensor_key='calculations.ID_WEB_BUPout', | ||
unique_id="circulating_pump_water", | ||
name=text_circulating_pump_water, | ||
icon="mdi:pump", | ||
device_class=DEVICE_CLASS_RUNNING, | ||
), | ||
|
||
# calculations.ID_WEB_ASDin Soledruck ausreichend | ||
# calculations.ID_WEB_HDin Hochdruck OK | ||
# calculations.ID_WEB_MOTin Motorschutz OK | ||
# calculations.ID_WEB_FP2out FBH Umwälzpumpe 2 | ||
# calculations.ID_WEB_MA1out Mischer 1 auf | ||
# calculations.ID_WEB_MZ1out Mischer 1 zu | ||
# calculations.ID_WEB_MA2out Mischer 2 auf | ||
# calculations.ID_WEB_MZ2out Mischer 2 zu | ||
# calculations.ID_WEB_VBOout Brunnenwasserpumpe (true) | ||
This comment has been minimized.
Sorry, something went wrong.
Kars-de-Jong
Contributor
|
||
] | ||
|
||
deviceInfoHeating = hass.data[f"{DOMAIN}_DeviceInfo_Heating"] | ||
if deviceInfoHeating is not None: | ||
text_solar_pump = get_sensor_text(lang, "solar_pump") | ||
entities += [ | ||
LuxtronikBinarySensor( | ||
hass=hass, | ||
luxtronik=luxtronik, | ||
deviceInfo=deviceInfo, | ||
sensor_key='calculations.ID_WEB_HUPout', | ||
unique_id="unloading_pump", | ||
name=text_unloading_pump, | ||
icon="mdi:pump", | ||
device_class=DEVICE_CLASS_RUNNING, | ||
), | ||
] | ||
|
||
deviceInfoDomesticWater = hass.data[f"{DOMAIN}_DeviceInfo_Domestic_Water"] | ||
if deviceInfoDomesticWater is not None: | ||
text_solar_pump = get_sensor_text(lang, "solar_pump") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
from homeassistant.config_entries import ConfigEntry | ||
from homeassistant.const import (DEVICE_CLASS_TEMPERATURE, ENTITY_CATEGORIES, | ||
TEMP_CELSIUS, | ||
TIME_HOURS) | ||
TIME_HOURS, TIME_MINUTES, PERCENTAGE) | ||
from homeassistant.core import HomeAssistant | ||
from homeassistant.helpers.entity import DeviceInfo, EntityCategory | ||
from homeassistant.helpers.entity_platform import AddEntitiesCallback | ||
|
@@ -23,12 +23,15 @@ | |
LUX_SENSOR_COOLING_STOP_DELAY, | ||
LUX_SENSOR_COOLING_TARGET, | ||
LUX_SENSOR_DOMESTIC_WATER_TARGET_TEMPERATURE, | ||
LUX_SENSOR_HEATING_CIRCUIT_CURVE1_TEMPERATURE, | ||
LUX_SENSOR_HEATING_CIRCUIT_CURVE2_TEMPERATURE, | ||
LUX_SENSOR_HEATING_CIRCUIT_CURVE_NIGHT_TEMPERATURE, | ||
LUX_SENSOR_HEATING_CIRCUIT_CURVE1_TEMPERATURE, | ||
LUX_SENSOR_HEATING_CIRCUIT_CURVE2_TEMPERATURE, | ||
LUX_SENSOR_HEATING_CIRCUIT_CURVE_NIGHT_TEMPERATURE, | ||
LUX_SENSOR_HEATING_MIN_FLOW_OUT_TEMPERATURE, | ||
LUX_SENSOR_PUMP_OPTIMIZATION_TIME, | ||
LUX_SENSOR_MAXIMUM_CIRCULATION_PUMP_SPEED, | ||
LUX_SENSOR_HEATING_TARGET_CORRECTION, | ||
LUX_SENSOR_HEATING_THRESHOLD_TEMPERATURE) | ||
LUX_SENSOR_HEATING_THRESHOLD_TEMPERATURE, | ||
LUX_SENSOR_HEATING_ROOM_TEMPERATURE_IMPACT_FACTOR) | ||
from .helpers.helper import get_sensor_text | ||
|
||
# endregion Imports | ||
|
@@ -60,17 +63,38 @@ async def async_setup_entry( | |
# Build Sensor names with local language: | ||
lang = config_entry.options.get(CONF_LANGUAGE_SENSOR_NAMES) | ||
text_temp = get_sensor_text(lang, 'temperature') | ||
entities = [] | ||
|
||
deviceInfo = hass.data[f"{DOMAIN}_DeviceInfo"] | ||
text_pump_optimization_time = get_sensor_text(lang, 'pump_optimization_time') | ||
text_maximum_circulation_pump_speed = get_sensor_text(lang, 'maximum_circulation_pump_speed') | ||
entities = [ | ||
LuxtronikNumber( | ||
hass, luxtronik, deviceInfo, | ||
number_key=LUX_SENSOR_PUMP_OPTIMIZATION_TIME, | ||
unique_id='pump_optimization_time', name=f"{text_pump_optimization_time}", | ||
icon='mdi:timer-settings', unit_of_measurement=TIME_MINUTES, min_value=5, max_value=180, step=5, mode=MODE_AUTO, entity_category=EntityCategory.CONFIG), | ||
LuxtronikNumber( | ||
hass, luxtronik, deviceInfo, | ||
number_key=LUX_SENSOR_MAXIMUM_CIRCULATION_PUMP_SPEED, | ||
This comment has been minimized.
Sorry, something went wrong.
Kars-de-Jong
Contributor
|
||
unique_id='maximum_circulation_pump_speed', name=f"{text_maximum_circulation_pump_speed}", | ||
icon='mdi:speedometer', unit_of_measurement=PERCENTAGE, min_value=0, max_value=100, step=10, mode=MODE_AUTO, entity_category=EntityCategory.CONFIG) | ||
] | ||
|
||
deviceInfoHeating = hass.data[f"{DOMAIN}_DeviceInfo_Heating"] | ||
if deviceInfoHeating is not None: | ||
text_heating_room_temperature_impact_factor = get_sensor_text(lang, 'heating_room_temperature_impact_factor') | ||
text_heating_threshold = get_sensor_text(lang, 'heating_threshold') | ||
text_correction = get_sensor_text(lang, 'correction') | ||
text_min_flow_out_temperature = get_sensor_text(lang, 'min_flow_out_temperature') | ||
text_heating_circuit_curve1_temperature = get_sensor_text(lang, 'circuit_curve1_temperature') | ||
text_heating_circuit_curve2_temperature = get_sensor_text(lang, 'circuit_curve2_temperature') | ||
text_heating_circuit_curve_night_temperature = get_sensor_text(lang, 'circuit_curve_night_temperature') | ||
entities += [ | ||
LuxtronikNumber( | ||
hass, luxtronik, deviceInfoHeating, | ||
number_key=LUX_SENSOR_HEATING_ROOM_TEMPERATURE_IMPACT_FACTOR, | ||
unique_id='heating_room_temperature_impact_factor', name=f"{text_heating_room_temperature_impact_factor}", | ||
icon='mdi:thermometer-chevron-up', unit_of_measurement=PERCENTAGE, min_value=100, max_value=200, step=5, mode=MODE_AUTO, entity_category=EntityCategory.CONFIG), | ||
LuxtronikNumber( | ||
hass, luxtronik, deviceInfoHeating, | ||
number_key=LUX_SENSOR_HEATING_TARGET_CORRECTION, | ||
|
@@ -111,7 +135,7 @@ async def async_setup_entry( | |
LuxtronikNumber( | ||
hass, luxtronik, deviceInfoDomesticWater, | ||
number_key=LUX_SENSOR_DOMESTIC_WATER_TARGET_TEMPERATURE, | ||
unique_id='domestic_water_target_temperature', name=f"{text_domestic_water} {text_target} {text_temp}", | ||
unique_id='domestic_water_target_temperature', name=f"{text_domestic_water} {text_target}", | ||
icon='mdi:water-boiler', unit_of_measurement=TEMP_CELSIUS, min_value=40.0, max_value=60.0, step=1.0, mode=MODE_BOX) | ||
] | ||
|
||
|
This name is not correct, it means Zusätzliche Umwälzpumpe, which is the additional pump(s) that is used for underfloor heating in high temperature systems.
There are more ZUP signals.