@@ -86,25 +86,25 @@ def _hex_bytes_to_int_array(self, hex_message: PayloadType) -> list[int] | None:
8686
8787
8888class LPHx1Converter (LetPotDeviceConverter ):
89- """Converters and info for device type LPH11 (Mini), LPH21 (Air), LPH31 (SE)."""
89+ """Converters and info for device type LPH11 (Mini), LPH21, LPH22 (Air), LPH31, LPH32 (SE)."""
9090
9191 @staticmethod
9292 def supports_type (device_type : str ) -> bool :
93- return device_type in ["LPH11" , "LPH21" , "LPH31" ]
93+ return device_type in ["LPH11" , "LPH21" , "LPH22" , " LPH31" , "LPH32 " ]
9494
9595 def get_device_model (self ) -> tuple [str , str ] | None :
9696 if self ._device_type == "LPH11" :
9797 return MODEL_MINI
98- elif self ._device_type == "LPH21" :
98+ elif self ._device_type in [ "LPH21" , "LPH22" ] :
9999 return MODEL_AIR
100- elif self ._device_type == "LPH31" :
100+ elif self ._device_type in [ "LPH31" , "LPH32" ] :
101101 return MODEL_SE
102102 else :
103103 return None
104104
105105 def supported_features (self ) -> DeviceFeature :
106106 features = DeviceFeature .CATEGORY_HYDROPONIC_GARDEN | DeviceFeature .PUMP_STATUS
107- if self ._device_type in ["LPH21" , "LPH31" ]:
107+ if self ._device_type in ["LPH21" , "LPH22" , " LPH31" , "LPH32 " ]:
108108 features |= DeviceFeature .LIGHT_BRIGHTNESS_LOW_HIGH
109109 return features
110110
@@ -137,7 +137,7 @@ def convert_hex_to_status(self, message: PayloadType) -> LetPotDeviceStatus | No
137137 _LOGGER .debug ("Invalid message received, ignoring: %s" , message )
138138 return None
139139
140- if self ._device_type == "LPH21" :
140+ if self ._device_type in [ "LPH21" , "LPH22" ] :
141141 error_pump_malfunction = None
142142 else :
143143 error_pump_malfunction = True if data [7 ] & 2 else False
@@ -162,7 +162,11 @@ def convert_hex_to_status(self, message: PayloadType) -> LetPotDeviceStatus | No
162162 )
163163
164164 def get_light_brightness_levels (self ) -> list [int ]:
165- return [500 , 1000 ] if self ._device_type in ["LPH21" , "LPH31" ] else []
165+ return (
166+ [500 , 1000 ]
167+ if self ._device_type in ["LPH21" , "LPH22" , "LPH31" , "LPH32" ]
168+ else []
169+ )
166170
167171
168172class IGSorAltConverter (LetPotDeviceConverter ):
0 commit comments