Skip to content

Commit 1fde42a

Browse files
cryptkm-d-brown
authored andcommitted
fix: chlorinator timed percent sending incorrect op_mode
1 parent 786cca9 commit 1fde42a

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

pyomnilogic_local/chlorinator.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,13 @@ async def set_timed_percent(self, percent: int) -> None:
392392
# BOW_POOL = 0, BOW_SPA = 1 (based on typical protocol values)
393393
bow_type = 0 if bow.equip_type == "BOW_POOL" else 1
394394

395-
# Get operating mode from telemetry (it's already an int or enum with .value)
396-
op_mode = self.telemetry.operating_mode if isinstance(self.telemetry.operating_mode, int) else self.telemetry.operating_mode.value
397-
398395
await self._api.async_set_chlorinator_params(
399396
pool_id=self.bow_id,
400397
equipment_id=self.system_id,
401398
timed_percent=percent,
402399
cell_type=self.mspconfig.cell_type.value, # ChlorinatorCellType is now IntEnum, use .value
403-
op_mode=op_mode,
404-
sc_timeout=self.mspconfig.superchlor_timeout,
400+
op_mode=self.operating_mode.value,
401+
sc_timeout=self.superchlor_timeout,
405402
bow_type=bow_type,
406-
orp_timeout=self.mspconfig.orp_timeout,
403+
orp_timeout=self.orp_timeout,
407404
)

0 commit comments

Comments
 (0)