Skip to content

Commit

Permalink
fix ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pail23 committed Apr 1, 2024
1 parent 19fe92e commit ad38a5b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions custom_components/stiebel_eltron_isg/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,11 @@ def create_volume_stream_entity_description(name, key):

ENERGY_SENSOR_TYPES = [
create_daily_energy_entity_description(
"Produced Heating Today",
"Produced Heating Today",
PRODUCED_HEATING_TODAY,
),
create_energy_entity_description(
"Produced Heating Total",
"Produced Heating Total",
PRODUCED_HEATING_TOTAL,
),
create_energy_entity_description(
Expand All @@ -340,15 +340,15 @@ def create_volume_stream_entity_description(name, key):
PRODUCED_WATER_HEATING_TOTAL,
),
create_energy_entity_description(
"Produced Water Heating",
"Produced Water Heating",
PRODUCED_WATER_HEATING
),
create_daily_energy_entity_description(
"Consumed Heating Today",
"Consumed Heating Today",
CONSUMED_HEATING_TODAY,
),
create_energy_entity_description(
"Consumed Heating Total",
"Consumed Heating Total",
CONSUMED_HEATING_TOTAL,
),
create_energy_entity_description(
Expand Down Expand Up @@ -552,14 +552,14 @@ def native_value(self):
def available(self) -> bool:
"""Return True if entity is available."""
return self.coordinator.data.get(self.entity_description.key) is not None

@property
def last_reset(self):
"""Set Last Reset to now, if value is 0"""
"""Set Last Reset to now, if value is 0."""
value = self.coordinator.data.get(self.entity_description.key)
if value is not None and value == 0:
return dt_util.utcnow()
else:
return None


0 comments on commit ad38a5b

Please sign in to comment.