diff --git a/docs/Naming-Convention.md b/docs/Naming-Convention.md index cab51b6..9e9cb15 100644 --- a/docs/Naming-Convention.md +++ b/docs/Naming-Convention.md @@ -37,7 +37,7 @@ sub-devices or third-party devices like button, relay state, light state. ## Property A property in the [FastyBird](https://www.fastybird.com) [IoT](https://en.wikipedia.org/wiki/Internet_of_things) ecosystem refers to a entity which is holding configuration values or -device actual state of a device. Connector, Device and Channel entity has own Property entities. +device actual state. Connector, Device and Channel entity has own Property entities. ### Connector Property diff --git a/src/Entities/Devices/Gateway.php b/src/Entities/Devices/Gateway.php index 794888b..13b40db 100644 --- a/src/Entities/Devices/Gateway.php +++ b/src/Entities/Devices/Gateway.php @@ -30,7 +30,7 @@ class Gateway extends Entities\NsPanelDevice { - public const TYPE = 'ns-panel-gateway'; + public const TYPE = 'ns-panel-connector-gateway'; public const STATE_READING_DELAY = 5_000.0; diff --git a/src/Entities/Devices/SubDevice.php b/src/Entities/Devices/SubDevice.php index fd7275e..249958c 100644 --- a/src/Entities/Devices/SubDevice.php +++ b/src/Entities/Devices/SubDevice.php @@ -31,7 +31,7 @@ class SubDevice extends Entities\NsPanelDevice { - public const TYPE = 'ns-panel-sub-device'; + public const TYPE = 'ns-panel-connector-sub-device'; /** * @throws Exceptions\InvalidState diff --git a/src/Entities/Devices/ThirdPartyDevice.php b/src/Entities/Devices/ThirdPartyDevice.php index 185ef06..05de938 100644 --- a/src/Entities/Devices/ThirdPartyDevice.php +++ b/src/Entities/Devices/ThirdPartyDevice.php @@ -30,7 +30,7 @@ class ThirdPartyDevice extends Entities\NsPanelDevice { - public const TYPE = 'ns-panel-third-party-device'; + public const TYPE = 'ns-panel-connector-third-party-device'; public function __construct( string $identifier, diff --git a/src/Entities/NsPanelChannel.php b/src/Entities/NsPanelChannel.php index f0c8a00..deab491 100644 --- a/src/Entities/NsPanelChannel.php +++ b/src/Entities/NsPanelChannel.php @@ -31,7 +31,7 @@ class NsPanelChannel extends DevicesEntities\Channels\Channel { - public const TYPE = 'ns-panel'; + public const TYPE = 'ns-panel-connector'; public function getType(): string { diff --git a/src/Entities/NsPanelConnector.php b/src/Entities/NsPanelConnector.php index 01e66ee..7c1ef9b 100644 --- a/src/Entities/NsPanelConnector.php +++ b/src/Entities/NsPanelConnector.php @@ -30,7 +30,7 @@ class NsPanelConnector extends DevicesEntities\Connectors\Connector { - public const TYPE = 'ns-panel'; + public const TYPE = 'ns-panel-connector'; public function getType(): string { diff --git a/src/Translations/ns-panel-connector.en_us.neon b/src/Translations/ns-panel-connector.en_us.neon index f795ab4..d2505e8 100644 --- a/src/Translations/ns-panel-connector.en_us.neon +++ b/src/Translations/ns-panel-connector.en_us.neon @@ -244,7 +244,7 @@ cmd: missing: "Connector identifier have to be provided." device: used: "This identifier is already used." - missing: "Device identifier have to provided." + missing: "Device identifier have to be provided." create: connector: success: "Connector \"%name%\" was successfully created." diff --git a/tests/sql/dummy.data.sql b/tests/sql/dummy.data.sql index 3ad0cd2..57f3aed 100644 --- a/tests/sql/dummy.data.sql +++ b/tests/sql/dummy.data.sql @@ -1,6 +1,6 @@ INSERT IGNORE INTO `fb_devices_module_connectors` (`connector_id`, `connector_identifier`, `connector_name`, `connector_comment`, `connector_enabled`, `connector_type`, `created_at`, `updated_at`) VALUES -(_binary 0x3c75e7f0bdfe407a823083dbbbdf0155, 'ns-panel', 'NS Panel', null, true, 'ns-panel', '2023-07-29 16:00:00', '2023-07-29 16:00:00'); +(_binary 0x3c75e7f0bdfe407a823083dbbbdf0155, 'ns-panel', 'NS Panel', null, true, 'ns-panel-connector', '2023-07-29 16:00:00', '2023-07-29 16:00:00'); INSERT IGNORE INTO `fb_devices_module_connectors_controls` (`control_id`, `connector_id`, `control_name`, `created_at`, `updated_at`) VALUES @@ -12,7 +12,7 @@ IGNORE INTO `fb_devices_module_connectors_properties` (`property_id`, `connector INSERT IGNORE INTO `fb_devices_module_devices` (`device_id`, `device_type`, `device_identifier`, `device_name`, `device_comment`, `params`, `created_at`, `updated_at`, `owner`, `connector_id`) VALUES -(_binary 0x896a5f357c9a47f29c72f1520d503364, 'ns-panel-gateway', 'Dummy NS Panel', null, null, null, '2023-07-29 16:00:00', '2023-07-29 16:00:00', '455354e8-96bd-4c29-84e7-9f10e1d4db4b', _binary 0x3c75e7f0bdfe407a823083dbbbdf0155); +(_binary 0x896a5f357c9a47f29c72f1520d503364, 'ns-panel-connector-gateway', 'Dummy NS Panel', null, null, null, '2023-07-29 16:00:00', '2023-07-29 16:00:00', '455354e8-96bd-4c29-84e7-9f10e1d4db4b', _binary 0x3c75e7f0bdfe407a823083dbbbdf0155); INSERT IGNORE INTO `fb_devices_module_devices_properties` (`property_id`, `device_id`, `property_type`, `property_identifier`, `property_name`, `property_settable`, `property_queryable`, `property_data_type`, `property_unit`, `property_format`, `property_invalid`, `property_scale`, `property_value`, `created_at`, `updated_at`) VALUES