Repository navigation
v1.4.3 — Fix Errors with Wired-only Devices
Fix: Wired-only device compatibility (GL-MT2500 / Brume 2)
The GL-MT2500 (Brume 2) is a wired-only router with no WiFi radio. The integration was calling WiFi-related RPC methods on every poll cycle, which the MT2500 firmware correctly rejects with -32601 Method not found. This caused cascading failures across the sensor, switch, and device tracker platforms.
api.py
- In
_make_rpc_call, RPC responses with error code-32601(Method not found) are now logged atDEBUGlevel instead ofERROR. This suppresses log spam on hardware that legitimately doesn't support a given RPC method. All other error codes continue to log atERROR.
sensor.py
- Both
.get("wifi_status_detail", {})calls (innative_valueandextra_state_attributes) replaced with.get("wifi_status_detail") or {}to correctly handle the case where the coordinator key exists but holdsNonerather than a missing key native_valueforwifi_devices_statusnow returnsNoneearly whenwifi_status_detailis falsyextra_state_attributesforwifi_devices_statusnow returns{}early under the same condition- The
WiFi Devices Statussensor will show as unavailable on wired-only devices rather than crashing every 30 seconds
switch.py
async_setup_entrynow guardswifi_configwithor {}before iterating, preventing the switch platform from crashing at startup on wired-only devicesGLiNetWiFiSwitch.is_onapplies the same guard onwifi_configGLiNetWiFiSwitch.extra_state_attributesapplies the same guard onwifi_status_detail- No WiFi switches will be created on devices that return no WiFi configuration
device_tracker.py
async_write_ha_state()is now guarded with ahass is not Nonecheck before being called on tracked devices- Previously, when the switch platform failed to set up cleanly, the coordinator would fire update callbacks against device tracker entities that had been created but not yet fully registered with HA, causing a
RuntimeError: Attribute hass is Nonecrash loop every 30 seconds - With the switch platform fix in place this guard may no longer trigger, but it is the correct defensive pattern regardless
General
All four files apply the same defensive pattern: .get("key") or {} rather than .get("key", {}) when the coordinator may store None explicitly for a key on unsupported hardware, rather than omitting the key entirely.