File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,18 +193,20 @@ async def _smile_detect(
193193 self ._store_smile_data (model )
194194 self ._process_for_thermostat (result )
195195
196- async def _collect_smile_data (self , dsmrmain : etree .Element , result : etree .Element ) -> str :
196+ async def _collect_smile_data (
197+ self , dsmrmain : etree .Element , result : etree .Element
198+ ) -> str :
197199 """Collect smile/gateway data."""
198200 model : str = "Unknown"
199201 if (gateway := result .find ("./gateway" )) is not None :
200202 self .smile .version = parse (gateway .find ("firmware_version" ).text )
201203 self .smile .hw_version = gateway .find ("hardware_version" ).text
202204 self .smile .hostname = gateway .find ("hostname" ).text
203205 self .smile .mac_address = gateway .find ("mac_address" ).text
204- if (vendor_model := gateway .find ("vendor_model" )) is None :
205- return # pragma: no cover
206+ if (vendor_model := gateway .find ("vendor_model" )) is not None :
207+ model = vendor_model . text
206208
207- model = vendor_model . text
209+ # Check for Anna P1 function
208210 elec_point_meters = result .findall (
209211 "./location/logs/point_log/electricity_point_meter"
210212 )
You can’t perform that action at this time.
0 commit comments