fix: remove incorrect ethernet badge on printer cards

home_flag bit 18 was incorrectly interpreted as "wired/ethernet
  connection", causing the ethernet badge to always show — even on
  printers without an ethernet port (e.g. A1, P1S). This hid the
  WiFi signal indicator entirely.

  Removed the wired_network field and ethernet badge UI. The WiFi
  signal badge now shows correctly whenever the printer reports
  signal strength.
This commit is contained in:
maziggy
2026-03-09 12:16:22 +01:00
parent 86d7028b80
commit 121b3d53df
9 changed files with 113 additions and 140 deletions
-1
View File
@@ -571,7 +571,6 @@ async def get_printer_status(
timelapse=state.timelapse,
ipcam=state.ipcam,
wifi_signal=state.wifi_signal,
wired_network=state.wired_network,
nozzles=nozzles,
nozzle_rack=nozzle_rack,
print_options=print_options,
+1 -2
View File
@@ -139,7 +139,7 @@ class AMSUnit(BaseModel):
is_ams_ht: bool = False # True for AMS-HT (single spool), False for regular AMS (4 spools)
tray: list[AMSTray] = []
serial_number: str = "" # AMS unit serial number (sn from MQTT)
sw_ver: str = "" # AMS firmware version (from get_version info.module)
sw_ver: str = "" # AMS firmware version (from get_version info.module)
class NozzleInfoResponse(BaseModel):
@@ -212,7 +212,6 @@ class PrinterStatus(BaseModel):
timelapse: bool = False # Timelapse recording active
ipcam: bool = False # Live view enabled
wifi_signal: int | None = None # WiFi signal strength in dBm
wired_network: bool = False # Ethernet connection detected
nozzles: list[NozzleInfoResponse] = [] # Nozzle hardware info (index 0=left/primary, 1=right)
nozzle_rack: list[NozzleRackSlot] = [] # H2C 6-nozzle tool-changer rack
print_options: PrintOptionsResponse | None = None # AI detection and print options
-3
View File
@@ -120,7 +120,6 @@ class PrinterState:
timelapse: bool = False # Timelapse recording active
ipcam: bool = False # Live view / camera streaming enabled
wifi_signal: int | None = None # WiFi signal strength in dBm
wired_network: bool = False # Ethernet connection detected (home_flag bit 18)
# Nozzle hardware info (for dual nozzle printers, index 0 = left, 1 = right)
nozzles: list = field(default_factory=lambda: [NozzleInfo(), NozzleInfo()])
# AI detection and print options
@@ -2071,8 +2070,6 @@ class BambuMQTTClient:
f"[{self.serial_number}] store_to_sdcard changed: {self.state.store_to_sdcard} -> {store_to_sdcard}"
)
self.state.store_to_sdcard = store_to_sdcard
# Bit 18 (0x00040000) indicates wired/ethernet connection
self.state.wired_network = bool((home_flag >> 18) & 1)
# Parse timelapse status (recording active during print)
if "timelapse" in data:
-1
View File
@@ -668,7 +668,6 @@ def printer_state_to_dict(state: PrinterState, printer_id: int | None = None, mo
"ams_extruder_map": ams_extruder_map,
# WiFi signal strength
"wifi_signal": state.wifi_signal,
"wired_network": state.wired_network,
# Calibration stage tracking
"stg_cur": state.stg_cur,
"stg_cur_name": get_derived_status_name(state, model),