Skip to content

Commit

Permalink
[thermostat-device-addon] Splitting virtual connector part to addon (…
Browse files Browse the repository at this point in the history
…#237)
  • Loading branch information
actions-user committed Jan 13, 2024
1 parent f852f2f commit 1904b38
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/Naming-Convention.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Devices/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Devices/SubDevice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Devices/ThirdPartyDevice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/NsPanelChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/NsPanelConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Translations/ns-panel-connector.en_us.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
4 changes: 2 additions & 2 deletions tests/sql/dummy.data.sql
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1904b38

Please sign in to comment.