From d415d65bff31b225f7a1230f2bd2d34c499d0e0b Mon Sep 17 00:00:00 2001
From: Fabio Manganiello <fabio@manganiello.tech>
Date: Thu, 29 Feb 2024 00:49:49 +0100
Subject: [PATCH] Removed legacy wiimote plugin

---
 docs/source/platypush/plugins/wiimote.rst |  6 --
 docs/source/plugins.rst                   |  1 -
 platypush/plugins/wiimote/__init__.py     | 69 -----------------------
 platypush/plugins/wiimote/manifest.yaml   |  6 --
 4 files changed, 82 deletions(-)
 delete mode 100644 docs/source/platypush/plugins/wiimote.rst
 delete mode 100644 platypush/plugins/wiimote/__init__.py
 delete mode 100644 platypush/plugins/wiimote/manifest.yaml

diff --git a/docs/source/platypush/plugins/wiimote.rst b/docs/source/platypush/plugins/wiimote.rst
deleted file mode 100644
index 1d2b806f9..000000000
--- a/docs/source/platypush/plugins/wiimote.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-``wiimote``
-=============================
-
-.. automodule:: platypush.plugins.wiimote
-	:members:
-
diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst
index 720b02014..edb7d3e14 100644
--- a/docs/source/plugins.rst
+++ b/docs/source/plugins.rst
@@ -145,7 +145,6 @@ Plugins
     platypush/plugins/weather.buienradar.rst
     platypush/plugins/weather.openweathermap.rst
     platypush/plugins/websocket.rst
-    platypush/plugins/wiimote.rst
     platypush/plugins/xmpp.rst
     platypush/plugins/youtube.rst
     platypush/plugins/zeroconf.rst
diff --git a/platypush/plugins/wiimote/__init__.py b/platypush/plugins/wiimote/__init__.py
deleted file mode 100644
index 3dfc47fbe..000000000
--- a/platypush/plugins/wiimote/__init__.py
+++ /dev/null
@@ -1,69 +0,0 @@
-import time
-
-from platypush.context import get_backend
-from platypush.plugins import Plugin, action
-
-
-class WiimotePlugin(Plugin):
-    """
-    WiiMote plugin.
-    A wrapper around the :mod:`platypush.backend.wiimote` backend to
-    programmatically control a Nintendo WiiMote.
-
-    It requires the WiiMote backend to be enabled.
-    """
-
-    @classmethod
-    def _get_wiimote(cls):
-        return get_backend('wiimote').get_wiimote()
-
-    @action
-    def connect(self):
-        """
-        Connects to the WiiMote
-        """
-        self._get_wiimote()
-
-    @action
-    def close(self):
-        """
-        Closes the connection with the WiiMote
-        """
-        get_backend('wiimote').close()
-
-    @action
-    def rumble(self, secs):
-        """
-        Rumbles the controller for the specified number of seconds
-        """
-        wm = self._get_wiimote()
-        wm.rumble = True
-        time.sleep(secs)
-        wm.rumble = False
-
-    @action
-    def state(self):
-        """
-        Return the state of the controller
-        """
-        return get_backend('wiimote').get_state()
-
-    @action
-    def set_leds(self, leds):
-        """
-        Set the LEDs state on the controller
-
-        :param leds: Iterable with the new states to be applied to the LEDs.
-            Example: [1, 0, 0, 0] or (False, True, False, False)
-        :type leds: list
-        """
-
-        new_led = 0
-        for i, led in enumerate(leds):
-            if led:
-                new_led |= 1 << i
-
-        self._get_wiimote().led = new_led
-
-
-# vim:sw=4:ts=4:et:
diff --git a/platypush/plugins/wiimote/manifest.yaml b/platypush/plugins/wiimote/manifest.yaml
deleted file mode 100644
index 80d570e87..000000000
--- a/platypush/plugins/wiimote/manifest.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-manifest:
-  events: {}
-  install:
-    pip: []
-  package: platypush.plugins.wiimote
-  type: plugin