@@ -132,12 +132,12 @@ class Bow(OmniEquipment[MSPBoW, TelemetryBoW]):
132132
133133 mspconfig : MSPBoW
134134 telemetry : TelemetryBoW
135- filters : EquipmentDict [Filter ] = EquipmentDict ()
135+ filters : EquipmentDict [Filter ]
136136 heater : Heater | None = None
137- relays : EquipmentDict [Relay ] = EquipmentDict ()
138- sensors : EquipmentDict [Sensor ] = EquipmentDict ()
139- lights : EquipmentDict [ColorLogicLight ] = EquipmentDict ()
140- pumps : EquipmentDict [Pump ] = EquipmentDict ()
137+ relays : EquipmentDict [Relay ]
138+ sensors : EquipmentDict [Sensor ]
139+ lights : EquipmentDict [ColorLogicLight ]
140+ pumps : EquipmentDict [Pump ]
141141 chlorinator : Chlorinator | None = None
142142 csad : CSAD | None = None
143143
@@ -288,7 +288,7 @@ def _update_filters(self, mspconfig: MSPBoW, telemetry: Telemetry) -> None:
288288 self .filters = EquipmentDict ()
289289 return
290290
291- self .filters = EquipmentDict ([Filter (self ._omni , filter_ , telemetry ) for filter_ in mspconfig .filter ])
291+ self .filters = self . _omni . _make_equipment_dict ([Filter (self ._omni , filter_ , telemetry ) for filter_ in mspconfig .filter ])
292292
293293 def _update_heater (self , mspconfig : MSPBoW , telemetry : Telemetry ) -> None :
294294 """Update the heater based on the MSP configuration."""
@@ -304,28 +304,30 @@ def _update_lights(self, mspconfig: MSPBoW, telemetry: Telemetry) -> None:
304304 self .lights = EquipmentDict ()
305305 return
306306
307- self .lights = EquipmentDict ([ColorLogicLight (self ._omni , light , telemetry ) for light in mspconfig .colorlogic_light ])
307+ self .lights = self ._omni ._make_equipment_dict (
308+ [ColorLogicLight (self ._omni , light , telemetry ) for light in mspconfig .colorlogic_light ]
309+ )
308310
309311 def _update_pumps (self , mspconfig : MSPBoW , telemetry : Telemetry ) -> None :
310312 """Update the pumps based on the MSP configuration."""
311313 if mspconfig .pump is None :
312314 self .pumps = EquipmentDict ()
313315 return
314316
315- self .pumps = EquipmentDict ([Pump (self ._omni , pump , telemetry ) for pump in mspconfig .pump ])
317+ self .pumps = self . _omni . _make_equipment_dict ([Pump (self ._omni , pump , telemetry ) for pump in mspconfig .pump ])
316318
317319 def _update_relays (self , mspconfig : MSPBoW , telemetry : Telemetry ) -> None :
318320 """Update the relays based on the MSP configuration."""
319321 if mspconfig .relay is None :
320322 self .relays = EquipmentDict ()
321323 return
322324
323- self .relays = EquipmentDict ([Relay (self ._omni , relay , telemetry ) for relay in mspconfig .relay ])
325+ self .relays = self . _omni . _make_equipment_dict ([Relay (self ._omni , relay , telemetry ) for relay in mspconfig .relay ])
324326
325327 def _update_sensors (self , mspconfig : MSPBoW , telemetry : Telemetry ) -> None :
326328 """Update the sensors based on the MSP configuration."""
327329 if mspconfig .sensor is None :
328330 self .sensors = EquipmentDict ()
329331 return
330332
331- self .sensors = EquipmentDict ([Sensor (self ._omni , sensor , telemetry ) for sensor in mspconfig .sensor ])
333+ self .sensors = self . _omni . _make_equipment_dict ([Sensor (self ._omni , sensor , telemetry ) for sensor in mspconfig .sensor ])
0 commit comments