File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
custom_components/ecoflow_cloud Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ async def fetch_all_available_devices(self) -> list[EcoflowDeviceInfo]:
4646 _LOGGER .debug (str (device ))
4747 sn = device ["sn" ]
4848 product_name = device .get ("productName" , "undefined" )
49+ if product_name == "undefined" :
50+ from ..devices .registry import device_by_product
51+ device_list = list (device_by_product .keys ())
52+ for devicetype in device_list :
53+ if "deviceName" in device and device ["deviceName" ].lower ().startswith (devicetype .lower ()):
54+ product_name = devicetype
4955 device_name = device .get ("deviceName" , f"{ product_name } -{ sn } " )
5056 status = int (device ["online" ])
5157 result .append (
Original file line number Diff line number Diff line change 7171 "Delta Pro 3" : public_delta_pro_3 .DeltaPro3 ,
7272 "Power Kits" : public_powerkit .PowerKit ,
7373 "Smart Meter" : public_smart_meter .SmartMeter ,
74- "STREAM AC" : public_stream_ac .StreamAC ,
74+ "Stream AC" : public_stream_ac .StreamAC ,
7575 "Diagnostic" : DiagnosticDevice ,
7676 }
7777)
You can’t perform that action at this time.
0 commit comments