Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Total/Total_Increasing sensors #223

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 27 additions & 16 deletions custom_components/stiebel_eltron_isg/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,6 @@ def create_volume_stream_entity_description(name, key):


ENERGY_SENSOR_TYPES = [
create_daily_energy_entity_description(
"Produced Heating Today",
PRODUCED_HEATING_TODAY,
),
create_energy_entity_description(
"Produced Heating Total",
PRODUCED_HEATING_TOTAL,
Expand All @@ -331,10 +327,6 @@ def create_volume_stream_entity_description(name, key):
"Produced Heating",
PRODUCED_HEATING,
),
create_daily_energy_entity_description(
"Produced Water Heating Today",
PRODUCED_WATER_HEATING_TODAY,
),
create_energy_entity_description(
"Produced Water Heating Total",
PRODUCED_WATER_HEATING_TOTAL,
Expand All @@ -343,10 +335,6 @@ def create_volume_stream_entity_description(name, key):
"Produced Water Heating",
PRODUCED_WATER_HEATING
),
create_daily_energy_entity_description(
"Consumed Heating Today",
CONSUMED_HEATING_TODAY,
),
create_energy_entity_description(
"Consumed Heating Total",
CONSUMED_HEATING_TOTAL,
Expand All @@ -355,10 +343,6 @@ def create_volume_stream_entity_description(name, key):
"Consumed Heating",
CONSUMED_HEATING,
),
create_daily_energy_entity_description(
"Consumed Water Heating Today",
CONSUMED_WATER_HEATING_TODAY,
),
create_energy_entity_description(
"Consumed Water Heating Total",
CONSUMED_WATER_HEATING_TOTAL,
Expand All @@ -369,6 +353,25 @@ def create_volume_stream_entity_description(name, key):
),
]

ENERGY_DAILY_SENSOR_TYPES = [
create_daily_energy_entity_description(
"Produced Heating Today",
PRODUCED_HEATING_TODAY,
),
create_daily_energy_entity_description(
"Produced Water Heating Today",
PRODUCED_WATER_HEATING_TODAY,
),
create_daily_energy_entity_description(
"Consumed Heating Today",
CONSUMED_HEATING_TODAY,
),
create_daily_energy_entity_description(
"Consumed Water Heating Today",
CONSUMED_WATER_HEATING_TODAY,
),
]


COMPRESSOR_SENSOR_TYPES = [
SensorEntityDescription(
Expand Down Expand Up @@ -472,6 +475,14 @@ async def async_setup_entry(hass, entry, async_add_devices):
entities.append(sensor)

for description in ENERGY_SENSOR_TYPES:
sensor = StiebelEltronISGSensor(
coordinator,
entry,
description,
)
entities.append(sensor)

for description in ENERGY_DAILY_SENSOR_TYPES:
sensor = StiebelEltronISGEnergySensor(
coordinator,
entry,
Expand Down
Loading