python-swidget 1.2.4__tar.gz → 1.2.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-swidget
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: Python API for Swidget smart devices
5
5
  Home-page: https://github.com/swidget/python-swidget
6
6
  License: GPL-3.0-or-later
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.9
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
16
17
  Provides-Extra: docs
17
18
  Requires-Dist: aiohttp (>=3.8.1)
18
19
  Requires-Dist: anyio
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-swidget"
3
- version = "1.2.4"
3
+ version = "1.2.5"
4
4
  description = "Python API for Swidget smart devices"
5
5
  license = "GPL-3.0-or-later"
6
6
  authors = ["Swidget"]
@@ -59,7 +59,7 @@ class SwidgetProtocol(ssdp.SimpleServiceDiscoveryProtocol):
59
59
  insert_type=insert_type,
60
60
  )
61
61
  _LOGGER.debug(
62
- f"Swidget device '{friendly_name}' at {ip_address}. {device_type}/{insert_type}"
62
+ f"Discovered Swidget device via SSDP: '{friendly_name}' at {ip_address} Type:{device_type}/{insert_type}"
63
63
  )
64
64
 
65
65
 
@@ -143,7 +143,7 @@ class SwidgetDevice:
143
143
  """Wrapper for the stop() function."""
144
144
  await self.stop()
145
145
 
146
- def add_event_callback(self, callback: Callable[[Any], Any]):
146
+ def add_event_callback(self, callback: Callable[[Any], Any]) -> bool:
147
147
  """Register a function to be called when a new websocket message is recieved."""
148
148
  for c in self._subscribers:
149
149
  if c == callback:
@@ -154,7 +154,7 @@ class SwidgetDevice:
154
154
  self._subscribers.append(callback)
155
155
  return True
156
156
 
157
- def remove_event_callback(self, callback: Callable[[Any], Any]):
157
+ def remove_event_callback(self, callback: Callable[[Any], Any]) -> bool:
158
158
  """Remove a registered callback function."""
159
159
  if callback in self._subscribers:
160
160
  self._subscribers.remove(callback)
@@ -181,7 +181,7 @@ class SwidgetDevice:
181
181
  )
182
182
  await self.signal_callbacks(message)
183
183
 
184
- async def signal_callbacks(self, message):
184
+ async def signal_callbacks(self, message) -> None:
185
185
  """Call any available registered callback functions."""
186
186
  _LOGGER.debug("SwidgetDevice.signal_callsbacks() called")
187
187
  for callback in self._subscribers:
File without changes