From 5d9ee194393466ca8ae9f5a21dde12560a824f0a Mon Sep 17 00:00:00 2001 From: Michel van de Wetering Date: Sat, 2 Apr 2022 17:53:41 +0200 Subject: [PATCH] Fix missing Band enum export and minor cleanup --- example.py | 5 ++++- ynca/__init__.py | 12 +++++------- ynca/constants.py | 4 ---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/example.py b/example.py index c0a3d2e..a4a96ec 100644 --- a/example.py +++ b/example.py @@ -5,7 +5,10 @@ import time import logging -from ynca import Receiver, Mute, ZONE_SUBUNIT_IDS, Subunit +from ynca import Receiver, Mute, Subunit + +ZONE_SUBUNIT_IDS = [Subunit.MAIN, Subunit.ZONE2, Subunit.ZONE3, Subunit.ZONE4] + if __name__ == "__main__": diff --git a/ynca/__init__.py b/ynca/__init__.py index 2609dd5..5978b2f 100644 --- a/ynca/__init__.py +++ b/ynca/__init__.py @@ -2,21 +2,19 @@ from .connection import YncaConnection, YncaConnectionError, ynca_console from .constants import ( - SoundPrg, + Avail, + Band, Mute, - Subunit, - ZONE_SUBUNIT_IDS, Playback, PlaybackInfo, Repeat, - Avail, + SoundPrg, + Subunit, ) from .receiver import ( + SUBUNIT_INPUT_MAPPINGS, Receiver, YncaInitializationFailedException, - SUBUNIT_INPUT_MAPPINGS, ) -from .zone import ZoneBase - logging.getLogger(__name__).addHandler(logging.NullHandler()) diff --git a/ynca/constants.py b/ynca/constants.py index 301afb6..2940e49 100644 --- a/ynca/constants.py +++ b/ynca/constants.py @@ -89,7 +89,3 @@ class Playback(str, Enum): class Band(str, Enum): AM = "AM" FM = "FM" - - -"""Subunits that are zones """ -ZONE_SUBUNIT_IDS = [Subunit.MAIN, Subunit.ZONE2, Subunit.ZONE3, Subunit.ZONE4]