From f2c8d6885d2fd7a178681eceb2a183d6cf842056 Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Tue, 9 Jul 2024 03:25:14 +0200 Subject: [PATCH] Getting started with bridges --- src/mash/bridges/bedscale.py | 0 src/mash/bridges/bridge.py | 12 ++++++++++++ src/mash/bridges/fritzbox.py | 0 src/mash/bridges/hue.py | 0 src/mash/bridges/matrixclock.py | 0 src/mash/bridges/zigbee2mqtt.py | 6 ++++++ 6 files changed, 18 insertions(+) create mode 100644 src/mash/bridges/bedscale.py create mode 100644 src/mash/bridges/bridge.py create mode 100644 src/mash/bridges/fritzbox.py create mode 100644 src/mash/bridges/hue.py create mode 100644 src/mash/bridges/matrixclock.py create mode 100644 src/mash/bridges/zigbee2mqtt.py diff --git a/src/mash/bridges/bedscale.py b/src/mash/bridges/bedscale.py new file mode 100644 index 0000000..e69de29 diff --git a/src/mash/bridges/bridge.py b/src/mash/bridges/bridge.py new file mode 100644 index 0000000..068d7a2 --- /dev/null +++ b/src/mash/bridges/bridge.py @@ -0,0 +1,12 @@ +class Bridge: + def __init__(self, *, id: str, type: str) -> None: + self._id = id + self._type = type + + @property + def id(self) -> str: + return self._id + + @property + def type(self) -> str: + return self._type diff --git a/src/mash/bridges/fritzbox.py b/src/mash/bridges/fritzbox.py new file mode 100644 index 0000000..e69de29 diff --git a/src/mash/bridges/hue.py b/src/mash/bridges/hue.py new file mode 100644 index 0000000..e69de29 diff --git a/src/mash/bridges/matrixclock.py b/src/mash/bridges/matrixclock.py new file mode 100644 index 0000000..e69de29 diff --git a/src/mash/bridges/zigbee2mqtt.py b/src/mash/bridges/zigbee2mqtt.py new file mode 100644 index 0000000..2926a52 --- /dev/null +++ b/src/mash/bridges/zigbee2mqtt.py @@ -0,0 +1,6 @@ +from mash.bridges.bridge import Bridge + + +class Z2mBridge(Bridge): + def __init__(self, *, id: str) -> None: + super().__init__(id=id, type="zigbee2mqtt")