Skip to content

Commit

Permalink
Merge pull request #52 from m-przybylski/bugfix/create-binary-sensor
Browse files Browse the repository at this point in the history
bugfix: Fix adding mixer sensor
  • Loading branch information
jontofront authored Jan 15, 2024
2 parents 2a56b95 + c702409 commit 3a58c5b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/econet300/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ def create_mixer_sensors(coordinator: EconetDataCoordinator, api: Econet300Api):
entities = []

for i in range(1, AVAILABLE_NUMBER_OF_MIXERS + 1):
availaimility_mixer_key = f"mixerTemp{i}"
if can_add_mixer(availaimility_mixer_key, coordinator):
availability_mixer_key = f"mixerTemp{i}"
if can_add_mixer(availability_mixer_key, coordinator):
description = EconetBinarySensorEntityDescription(
availability_key=availaimility_mixer_key,
availability_key=availability_mixer_key,
key=f"mixerPumpWorks{i}",
name=f"Mixer {i}",
icon="mdi:pump",
Expand All @@ -197,7 +197,7 @@ def create_mixer_sensors(coordinator: EconetDataCoordinator, api: Econet300Api):
else:
_LOGGER.debug(
"Availability key: %s does not exist, entity will not be added",
description.key,
availability_mixer_key,
)

return entities
Expand Down

0 comments on commit 3a58c5b

Please sign in to comment.