diff --git a/custom_components/moonraker/__init__.py b/custom_components/moonraker/__init__.py index ece4454..f183963 100755 --- a/custom_components/moonraker/__init__.py +++ b/custom_components/moonraker/__init__.py @@ -124,9 +124,11 @@ async def _gcode_file_detail_updater(coordinator): data = await coordinator._async_fetch_data( METHODS.PRINTER_OBJECTS_QUERY, coordinator.query_obj ) - return await coordinator._async_get_gcode_file_detail( - data["status"]["print_stats"]["filename"] - ) + filename = "" + if "status" in data: + filename = data["status"]["print_stats"]["filename"] + + return await coordinator._async_get_gcode_file_detail(filename) class MoonrakerDataUpdateCoordinator(DataUpdateCoordinator):