fix: inherit MediaDriver instead of AccessPointDriver

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.
This commit is contained in:
Christian Manivong
2026-08-21 13:07:37 +07:00
parent f33ea2a774
commit 8dc3b42fd3
+2 -2
View File
@@ -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