Skip to content

Commit

Permalink
Fix: Add sensors entities for relays of the optional extension module
Browse files Browse the repository at this point in the history
  • Loading branch information
ylabonte committed Apr 3, 2024
1 parent 39a56cf commit a2e0700
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/proconip_pool_controller/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ async def async_setup_entry(
coordinator=coordinator, canister_no=i + 1, instance_id=entry.entry_id
)
)
for i in range(8):
number_of_relays = 16 if coordinator.data.is_relay_extension_enabled() else 8
for i in range(number_of_relays):
sensor_entities.append(
ProconipRelayStateSensor(
coordinator=coordinator, relay_no=i + 1, instance_id=entry.entry_id
Expand Down

0 comments on commit a2e0700

Please sign in to comment.