Skip to content

Commit

Permalink
Update init connector command
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Apr 5, 2022
1 parent c82f6cf commit a767ae2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fastybird_devices_module/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
Devices module
"""

__version__ = "0.49.0"
__version__ = "0.50.0"
5 changes: 3 additions & 2 deletions fastybird_devices_module/connectors/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
from fastybird_devices_module.entities.connector import (
ConnectorControlEntity,
ConnectorDynamicPropertyEntity,
ConnectorEntity,
)
from fastybird_devices_module.entities.device import (
DeviceControlEntity,
Expand Down Expand Up @@ -105,7 +106,7 @@ def id(self) -> uuid.UUID: # pylint: disable=invalid-name
# -----------------------------------------------------------------------------

@abstractmethod
def initialize(self, settings: Optional[Dict] = None) -> None:
def initialize(self, connector: ConnectorEntity) -> None:
"""Set connector to initial state"""

# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -460,7 +461,7 @@ def load(self, connector_id: uuid.UUID) -> None:
if not isinstance(self.__connector, IConnector):
raise AttributeError(f"Instance of connector {connector.type} couldn't be created")

self.__connector.initialize(settings=connector.params)
self.__connector.initialize(connector=connector)

except Exception as ex: # pylint: disable=broad-except
self.__logger.exception(ex)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fastybird/devices-module",
"version": "0.48.0",
"version": "0.50.0",
"description": "Devices module data model plugin",
"keywords": [
"devices",
Expand Down

0 comments on commit a767ae2

Please sign in to comment.