From 8dc3b42fd386021e17cda3ed53a7eb3b0109ddfe Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Fri, 21 Aug 2026 13:07:37 +0700 Subject: [PATCH] fix: inherit MediaDriver instead of AccessPointDriver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A Sonos speaker implements none of the access-point surface — no SSIDs, no radio configuration, no MAC ACL. It has get_playback_state, get_volume, play and get_zone_info. It inherited AccessPointDriver because nothing better existed, and netOrk reads that role to decide what belongs in its wireless page and its AP profile pickers, so a speaker showed up in both. napalm-device-types now has MediaDriver, which is what this is. TYPE_LABEL becomes "Media" rather than "Access Point". Same root cause as netork#117. --- napalm_sonos/sonos_driver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/napalm_sonos/sonos_driver.py b/napalm_sonos/sonos_driver.py index c0868d4..92e991e 100644 --- a/napalm_sonos/sonos_driver.py +++ b/napalm_sonos/sonos_driver.py @@ -6,7 +6,7 @@ from typing import Any from napalm.base.exceptions import ConnectionException -from napalm_device_types import AccessPointDriver, FingerprintRule, PortSpec +from napalm_device_types import FingerprintRule, MediaDriver, PortSpec from napalm_device_types.models import DeviceActionResultDict """NAPALM driver for Sonos speakers. @@ -19,7 +19,7 @@ media-playback controls. _VOLUME_RE = re.compile(r"^\d+$") -class SonosDriver(AccessPointDriver): +class SonosDriver(MediaDriver): """NAPALM driver for controlling Sonos speakers. Implements the standard NAPALM interface plus media-playback methods