@@ -138,6 +138,31 @@ class Bow(OmniEquipment[MSPBoW, TelemetryBoW]):
138138 def __init__ (self , omni : "OmniLogic" , mspconfig : MSPBoW , telemetry : Telemetry ) -> None :
139139 super ().__init__ (omni , mspconfig , telemetry )
140140
141+ def __repr__ (self ) -> str :
142+ """Return a string representation of the Bow for debugging.
143+
144+ Returns:
145+ A string showing the class name, system_id, name, type, and equipment counts.
146+ """
147+ parts = [f"system_id={ self .system_id !r} " , f"name={ self .name !r} " , f"type={ self .equip_type !r} " ]
148+
149+ # Add equipment counts
150+ parts .append (f"filters={ len (self .filters )} " )
151+ parts .append (f"pumps={ len (self .pumps )} " )
152+ parts .append (f"lights={ len (self .lights )} " )
153+ parts .append (f"relays={ len (self .relays )} " )
154+ parts .append (f"sensors={ len (self .sensors )} " )
155+
156+ # Add heater and chlorinator status (present or not)
157+ if self .heater is not None :
158+ parts .append ("heater=True" )
159+ if self .chlorinator is not None :
160+ parts .append ("chlorinator=True" )
161+ if len (self .csads ) > 0 :
162+ parts .append (f"csads={ len (self .csads )} " )
163+
164+ return f"Bow({ ', ' .join (parts )} )"
165+
141166 @property
142167 def equip_type (self ) -> BodyOfWaterType | str :
143168 """The equipment type of the bow (POOL or SPA)."""
0 commit comments