Skip to content

Commit dc18459

Browse files
authored
Merge pull request #233 from loopj/rename-base-controller
Rename BaseController to Controller
2 parents f49c1f1 + b3e3026 commit dc18459

24 files changed

+48
-48
lines changed

src/aiovantage/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
AnemoSensorsController,
1616
AreasController,
1717
BackBoxesController,
18-
BaseController,
1918
BlindGroupsController,
2019
BlindsController,
2120
ButtonsController,
21+
Controller,
2222
DryContactsController,
2323
GMemController,
2424
LightSensorsController,
@@ -43,7 +43,7 @@
4343
]
4444

4545
T = TypeVar("T")
46-
ControllerT = TypeVar("ControllerT", bound=BaseController[Any])
46+
ControllerT = TypeVar("ControllerT", bound=Controller[Any])
4747

4848

4949
class Vantage:
@@ -110,7 +110,7 @@ def add_controller(controller_cls: type[ControllerT]) -> ControllerT:
110110
self._controllers.add(controller)
111111
return controller
112112

113-
self._controllers: set[BaseController[Any]] = set()
113+
self._controllers: set[Controller[Any]] = set()
114114
self._anemo_sensors = add_controller(AnemoSensorsController)
115115
self._areas = add_controller(AreasController)
116116
self._back_boxes = add_controller(BackBoxesController)
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import AnemoSensor
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class AnemoSensorsController(BaseController[AnemoSensor]):
6+
class AnemoSensorsController(Controller[AnemoSensor]):
77
"""Anemo sensors (wind speed sensors) controller."""
88

99
vantage_types = ("AnemoSensor",)

src/aiovantage/_controllers/areas.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import Area
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class AreasController(BaseController[Area]):
6+
class AreasController(Controller[Area]):
77
"""Areas controller."""
88

99
vantage_types = ("Area",)

src/aiovantage/_controllers/back_boxes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import BackBox
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class BackBoxesController(BaseController[BackBox]):
6+
class BackBoxesController(Controller[BackBox]):
77
"""Back boxes controller.
88
99
Back boxes typically represent a "gang box" in a wall which may contain

src/aiovantage/_controllers/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
T = TypeVar("T", bound=SystemObject)
2626

2727

28-
class BaseController(QuerySet[T], EventDispatcher):
28+
class Controller(QuerySet[T], EventDispatcher):
2929
"""Base controller for managing collections of Vantage objects."""
3030

3131
vantage_types: tuple[str, ...]

src/aiovantage/_controllers/blind_groups.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from aiovantage.objects import BlindGroup, SomfyRS485GroupChild, SomfyURTSI2GroupChild
22

3-
from .base import BaseController
3+
from .base import Controller
44

55
BlindGroupTypes = BlindGroup | SomfyRS485GroupChild | SomfyURTSI2GroupChild
66
"""Types managed by the blind groups controller."""
77

88

9-
class BlindGroupsController(BaseController[BlindGroupTypes]):
9+
class BlindGroupsController(Controller[BlindGroupTypes]):
1010
"""Blind groups controller."""
1111

1212
vantage_types = (

src/aiovantage/_controllers/blinds.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
SomfyURTSI2ShadeChild,
88
)
99

10-
from .base import BaseController
10+
from .base import Controller
1111
from .query import QuerySet
1212

1313
BlindTypes = (
@@ -16,7 +16,7 @@
1616
"""Types managed by the blinds controller."""
1717

1818

19-
class BlindsController(BaseController[BlindTypes]):
19+
class BlindsController(Controller[BlindTypes]):
2020
"""Blinds controller."""
2121

2222
vantage_types = (
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import Button
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class ButtonsController(BaseController[Button]):
6+
class ButtonsController(Controller[Button]):
77
"""Buttons controller."""
88

99
vantage_types = ("Button",)
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import DryContact
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class DryContactsController(BaseController[DryContact]):
6+
class DryContactsController(Controller[DryContact]):
77
"""Dry contacts controller."""
88

99
vantage_types = ("DryContact",)

src/aiovantage/_controllers/gmem.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import GMem
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class GMemController(BaseController[GMem]):
6+
class GMemController(Controller[GMem]):
77
"""GMem (variables) controller."""
88

99
vantage_types = ("GMem",)
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import LightSensor
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class LightSensorsController(BaseController[LightSensor]):
6+
class LightSensorsController(Controller[LightSensor]):
77
"""Light sensors controller."""
88

99
vantage_types = ("LightSensor",)
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import LoadGroup
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class LoadGroupsController(BaseController[LoadGroup]):
6+
class LoadGroupsController(Controller[LoadGroup]):
77
"""Load groups controller."""
88

99
vantage_types = ("LoadGroup",)

src/aiovantage/_controllers/loads.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from aiovantage.objects import Load, LoadGroup
22

3-
from .base import BaseController
3+
from .base import Controller
44
from .query import QuerySet
55

66

7-
class LoadsController(BaseController[Load]):
7+
class LoadsController(Controller[Load]):
88
"""Loads controller."""
99

1010
vantage_types = ("Load",)
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import Master
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class MastersController(BaseController[Master]):
6+
class MastersController(Controller[Master]):
77
"""Masters (InFusion Controllers) controller."""
88

99
vantage_types = ("Master",)

src/aiovantage/_controllers/modules.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import SystemObject
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class ModulesController(BaseController[SystemObject]):
6+
class ModulesController(Controller[SystemObject]):
77
"""Modules controller.
88
99
Modules are relay or dimming modules connected to the Vantage system.

src/aiovantage/_controllers/omni_sensors.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import OmniSensor
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class OmniSensorsController(BaseController[OmniSensor]):
6+
class OmniSensorsController(Controller[OmniSensor]):
77
"""Omni sensors controller.
88
99
Omni sensors are generic sensors objects which specify which methods to use

src/aiovantage/_controllers/port_devices.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import PortDevice
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class PortDevicesController(BaseController[PortDevice]):
6+
class PortDevicesController(Controller[PortDevice]):
77
"""Port devices controller.
88
99
Port devices are typically "hubs" that communicate with other devices such
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import PowerProfile
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class PowerProfilesController(BaseController[PowerProfile]):
6+
class PowerProfilesController(Controller[PowerProfile]):
77
"""Power profiles controller."""
88

99
vantage_types = ("PowerProfile", "DCPowerProfile", "PWMPowerProfile")

src/aiovantage/_controllers/rgb_loads.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from aiovantage.objects import VantageDDGColorLoad, VantageDGColorLoad
22

3-
from .base import BaseController
3+
from .base import Controller
44
from .query import QuerySet
55

66
RGBLoadTypes = VantageDDGColorLoad | VantageDGColorLoad
77
"""Types managed by the RGB loads controller."""
88

99

10-
class RGBLoadsController(BaseController[RGBLoadTypes]):
10+
class RGBLoadsController(Controller[RGBLoadTypes]):
1111
"""RGB loads controller."""
1212

1313
vantage_types = ("Vantage.DGColorLoad", "Vantage.DDGColorLoad")

src/aiovantage/_controllers/stations.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import StationObject
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class StationsController(BaseController[StationObject]):
6+
class StationsController(Controller[StationObject]):
77
"""Stations controller.
88
99
Stations typically represent keypads or remote relays. It is mostly useful

src/aiovantage/_controllers/tasks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import Task
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class TasksController(BaseController[Task]):
6+
class TasksController(Controller[Task]):
77
"""Tasks controller."""
88

99
vantage_types = ("Task",)

src/aiovantage/_controllers/temperatures.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from aiovantage.objects import Temperature
22

3-
from .base import BaseController
3+
from .base import Controller
44

55

6-
class TemperaturesController(BaseController[Temperature]):
6+
class TemperaturesController(Controller[Temperature]):
77
"""Temperature device controller.
88
99
Temperature devices are device that measure or control temperature.

src/aiovantage/_controllers/thermostats.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
VantageVirtualThermostatPort,
77
)
88

9-
from .base import BaseController
9+
from .base import Controller
1010

1111
ThermostatTypes = (
1212
Thermostat
@@ -18,7 +18,7 @@
1818
"""Types managed by the thermostats controller."""
1919

2020

21-
class ThermostatsController(BaseController[ThermostatTypes]):
21+
class ThermostatsController(Controller[ThermostatTypes]):
2222
"""Thermostats controller."""
2323

2424
vantage_types = (

src/aiovantage/controllers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from ._controllers.anemo_sensors import AnemoSensorsController
3131
from ._controllers.areas import AreasController
3232
from ._controllers.back_boxes import BackBoxesController
33-
from ._controllers.base import BaseController
33+
from ._controllers.base import Controller
3434
from ._controllers.blind_groups import BlindGroupsController, BlindGroupTypes
3535
from ._controllers.blinds import BlindsController, BlindTypes
3636
from ._controllers.buttons import ButtonsController
@@ -55,7 +55,7 @@
5555
"AnemoSensorsController",
5656
"AreasController",
5757
"BackBoxesController",
58-
"BaseController",
58+
"Controller",
5959
"BlindGroupsController",
6060
"BlindGroupTypes",
6161
"BlindsController",

0 commit comments

Comments
 (0)