Skip to content

Commit

Permalink
Add additional sensors (replaces #207)
Browse files Browse the repository at this point in the history
  • Loading branch information
pail23 committed Mar 8, 2024
1 parent cb3d46c commit 1dbe21a
Show file tree
Hide file tree
Showing 3 changed files with 518 additions and 3 deletions.
282 changes: 281 additions & 1 deletion custom_components/stiebel_eltron_isg/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,65 @@
from homeassistant.helpers.entity import EntityCategory

from .entity import StiebelEltronISGEntity
from .const import DOMAIN, IS_HEATING, IS_COOLING, IS_HEATING_WATER, IS_SUMMER_MODE, PUMP_ON_HK1, PUMP_ON_HK2, COMPRESSOR_ON, SWITCHING_PROGRAM_ENABLED, ELECTRIC_REHEATING, SERVICE, POWER_OFF, FILTER, VENTILATION, EVAPORATOR_DEFROST, FILTER_EXTRACT_AIR, FILTER_VENTILATION_AIR, HEAT_UP_PROGRAM, NHZ_STAGES_RUNNING, ERROR_STATUS
from .const import (
DOMAIN,
IS_HEATING,
IS_COOLING,
IS_HEATING_WATER,
IS_SUMMER_MODE,
PUMP_ON_HK1,
PUMP_ON_HK2,
COMPRESSOR_ON,
SWITCHING_PROGRAM_ENABLED,
ELECTRIC_REHEATING,
SERVICE,
POWER_OFF,
FILTER,
VENTILATION,
EVAPORATOR_DEFROST,
FILTER_EXTRACT_AIR,
FILTER_VENTILATION_AIR,
HEAT_UP_PROGRAM,
NHZ_STAGES_RUNNING,
ERROR_STATUS,
HEATING_CIRCUIT_1_PUMP,
HEATING_CIRCUIT_2_PUMP,
HEATING_CIRCUIT_3_PUMP,
HEATING_CIRCUIT_4_PUMP,
HEATING_CIRCUIT_5_PUMP,
BUFFER_1_CHARGING_PUMP,
BUFFER_2_CHARGING_PUMP,
BUFFER_3_CHARGING_PUMP,
BUFFER_4_CHARGING_PUMP,
BUFFER_5_CHARGING_PUMP,
BUFFER_6_CHARGING_PUMP,
DHW_CHARGING_PUMP,
SOURCE_PUMP,
DIFF_CONTROLLER_1_PUMP,
DIFF_CONTROLLER_2_PUMP,
POOL_PRIMARY_PUMP,
POOL_SECONDARY_PUMP,
HEAT_PUMP_1_ON,
HEAT_PUMP_2_ON,
HEAT_PUMP_3_ON,
HEAT_PUMP_4_ON,
HEAT_PUMP_5_ON,
HEAT_PUMP_6_ON,
SECOND_GENERATOR_DHW,
SECOND_GENERATOR_HEATING,
COOLING_MODE,
MIXER_OPEN_HTG_CIRCUIT_2,
MIXER_OPEN_HTG_CIRCUIT_3,
MIXER_OPEN_HTG_CIRCUIT_4,
MIXER_OPEN_HTG_CIRCUIT_5,
MIXER_CLOSE_HTG_CIRCUIT_2,
MIXER_CLOSE_HTG_CIRCUIT_3,
MIXER_CLOSE_HTG_CIRCUIT_4,
MIXER_CLOSE_HTG_CIRCUIT_5,
EMERGENCY_HEATING_1,
EMERGENCY_HEATING_2,
EMERGENCY_HEATING_1_2,
)

BINARY_SENSOR_TYPES = [
BinarySensorEntityDescription(
Expand Down Expand Up @@ -126,6 +184,228 @@
icon="mdi:alert",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heating circuit 1 pump",
key=HEATING_CIRCUIT_1_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heating circuit 2 pump",
key=HEATING_CIRCUIT_2_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heating circuit 3 pump",
key=HEATING_CIRCUIT_3_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heating circuit 4 pump",
key=HEATING_CIRCUIT_4_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heating circuit 5 pump",
key=HEATING_CIRCUIT_5_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Buffer 1 charging pump",
key=BUFFER_1_CHARGING_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Buffer 2 charging pump",
key=BUFFER_2_CHARGING_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Buffer 3 charging pump",
key=BUFFER_3_CHARGING_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Buffer 4 charging pump",
key=BUFFER_4_CHARGING_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Buffer 5 charging pump",
key=BUFFER_5_CHARGING_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Buffer 6 charging pump",
key=BUFFER_6_CHARGING_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="DHW charging pump",
key=DHW_CHARGING_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Source pump",
key=SOURCE_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Diff. controller 1 pump",
key=DIFF_CONTROLLER_1_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Diff. controller 2 pump",
key=DIFF_CONTROLLER_2_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Pool primary pump",
key=POOL_PRIMARY_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Pool secondary pump",
key=POOL_SECONDARY_PUMP,
icon="mdi:pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heat pump 1 ON",
key=HEAT_PUMP_1_ON,
icon="mdi:heat-pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heat pump 2 ON",
key=HEAT_PUMP_2_ON,
icon="mdi:heat-pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heat pump 3 ON",
key=HEAT_PUMP_3_ON,
icon="mdi:heat-pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heat pump 4 ON",
key=HEAT_PUMP_4_ON,
icon="mdi:heat-pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heat pump 5 ON",
key=HEAT_PUMP_5_ON,
icon="mdi:heat-pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Heat pump 6 ON",
key=HEAT_PUMP_6_ON,
icon="mdi:heat-pump",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Second generator for DHW",
key=SECOND_GENERATOR_DHW,
icon="mdi:water-boiler",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Second generator for heating",
key=SECOND_GENERATOR_HEATING,
icon="mdi:water-boiler",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Cooling active",
key=COOLING_MODE,
icon="mdi:snowflake",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Mixer opening heating circuit 2",
key=MIXER_OPEN_HTG_CIRCUIT_2,
icon="mdi:valve-open",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Mixer opening heating circuit 3",
key=MIXER_OPEN_HTG_CIRCUIT_3,
icon="mdi:valve-open",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Mixer opening heating circuit 4",
key=MIXER_OPEN_HTG_CIRCUIT_4,
icon="mdi:valve-open",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Mixer opening heating circuit 5",
key=MIXER_OPEN_HTG_CIRCUIT_5,
icon="mdi:valve-open",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Mixer closing heating circuit 2",
key=MIXER_CLOSE_HTG_CIRCUIT_2,
icon="mdi:valve-closed",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Mixer closing heating circuit 3",
key=MIXER_CLOSE_HTG_CIRCUIT_3,
icon="mdi:valve-closed",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Mixer closing heating circuit 4",
key=MIXER_CLOSE_HTG_CIRCUIT_4,
icon="mdi:valve-closed",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Mixer closing heating circuit 5",
key=MIXER_CLOSE_HTG_CIRCUIT_5,
icon="mdi:valve-closed",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Emergency heating 1",
key=EMERGENCY_HEATING_1,
icon="mdi:fence-electric",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Emergency heating 2",
key=EMERGENCY_HEATING_2,
icon="mdi:fence-electric",
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Emergency heating 1 & 2",
key=EMERGENCY_HEATING_1_2,
icon="mdi:fence-electric",
has_entity_name=True,
),
]


Expand Down
43 changes: 43 additions & 0 deletions custom_components/stiebel_eltron_isg/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,49 @@
COMPRESSOR_ON = "compressor_on"
CIRCULATION_PUMP = "circulation_pump"

HEATING_CIRCUIT_1_PUMP = "heating_circuit_1_pump"
HEATING_CIRCUIT_2_PUMP = "heating_circuit_2_pump"
HEATING_CIRCUIT_3_PUMP = "heating_circuit_3_pump"
HEATING_CIRCUIT_4_PUMP = "heating_circuit_4_pump"
HEATING_CIRCUIT_5_PUMP = "heating_circuit_5_pump"
BUFFER_1_CHARGING_PUMP = "buffer_1_charging_pump"
BUFFER_2_CHARGING_PUMP = "buffer_2_charging_pump"
BUFFER_3_CHARGING_PUMP = "buffer_3_charging_pump"
BUFFER_4_CHARGING_PUMP = "buffer_4_charging_pump"
BUFFER_5_CHARGING_PUMP = "buffer_5_charging_pump"
BUFFER_6_CHARGING_PUMP = "buffer_6_charging_pump"
DHW_CHARGING_PUMP = "dhw_charging_pump"
SOURCE_PUMP = "source_pump"

DIFF_CONTROLLER_1_PUMP = "diff_controller_1_pump"
DIFF_CONTROLLER_2_PUMP = "diff_controller_2_pump"
POOL_PRIMARY_PUMP = "pool_primary_pump"
POOL_SECONDARY_PUMP = "pool_secondary_pump"

HEAT_PUMP_1_ON = "heat_pump_1_on"
HEAT_PUMP_2_ON = "heat_pump_2_on"
HEAT_PUMP_3_ON = "heat_pump_3_on"
HEAT_PUMP_4_ON = "heat_pump_4_on"
HEAT_PUMP_5_ON = "heat_pump_5_on"
HEAT_PUMP_6_ON = "heat_pump_6_on"

SECOND_GENERATOR_DHW = "second_generator_dhw"
SECOND_GENERATOR_HEATING = "second_generator_heating"
COOLING_MODE = "cooling_mode"

MIXER_OPEN_HTG_CIRCUIT_2 = "mixer_open_htg_circuit_2"
MIXER_OPEN_HTG_CIRCUIT_3 = "mixer_open_htg_circuit_3"
MIXER_OPEN_HTG_CIRCUIT_4 = "mixer_open_htg_circuit_4"
MIXER_OPEN_HTG_CIRCUIT_5 = "mixer_open_htg_circuit_5"
MIXER_CLOSE_HTG_CIRCUIT_2 = "mixer_close_htg_circuit_2"
MIXER_CLOSE_HTG_CIRCUIT_3 = "mixer_close_htg_circuit_3"
MIXER_CLOSE_HTG_CIRCUIT_4 = "mixer_close_htg_circuit_4"
MIXER_CLOSE_HTG_CIRCUIT_5 = "mixer_close_htg_circuit_5"

EMERGENCY_HEATING_1 = "emergency_heating_1"
EMERGENCY_HEATING_2 = "emergency_heating_2"
EMERGENCY_HEATING_1_2 = "emergency_heating_1_2"

SWITCHING_PROGRAM_ENABLED = "switching_program_enabled"
ELECTRIC_REHEATING = "electric_reheating"
SERVICE = "service"
Expand Down
Loading

0 comments on commit 1dbe21a

Please sign in to comment.