-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: "Events" | ||
linkTitle: "events" | ||
date: 2024-01-13 | ||
description: > | ||
--- | ||
|
||
In the Smart Home system, there is a JavaScript function called **PushSystemEvent** that plays a crucial role in dynamic system management. This function accepts various commands for interacting with tasks, triggers, and other components of the system. | ||
|
||
| Command | Description | | ||
|---------------------------|----------------------------------------------------------------| | ||
| `command_enable_task` | Enables the execution of a task. | | ||
| `command_disable_task` | Disables the execution of a task. | | ||
| `command_enable_trigger` | Enables a trigger, activating the triggering capability. | | ||
| `command_disable_trigger` | Disables a trigger, suspending the triggering capability. | | ||
| `event_call_trigger` | Initiates a trigger call event. | | ||
| `event_call_action` | Initiates an action call event. | | ||
| `command_load_entity` | Loads an entity into the system. | | ||
| `command_unload_entity` | Unloads an entity from the system. | | ||
|
||
#### Example of Usage: | ||
|
||
```javascript | ||
// Example of enabling a task | ||
PushSystemEvent('command_enable_task', { id: 1 }); | ||
|
||
// Example of calling a trigger | ||
PushSystemEvent('event_call_trigger', { id: 1 }); | ||
|
||
// Example of loading an entity | ||
PushSystemEvent('command_load_entity', { id: 'sensor.entity1' }); | ||
``` | ||
|
||
These commands provide control over tasks, triggers, trigger call events, actions, as well as loading and unloading entities in the Smart Home system. Their use enables dynamic management of system functionality and interaction with its components. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: "Events" | ||
linkTitle: "events" | ||
date: 2024-01-13 | ||
description: > | ||
--- | ||
|
||
В системе Smart Home предоставляется JavaScript функция **PushSystemEvent**, которая играет важную роль в динамическом управлении системой. Эта функция принимает различные команды для взаимодействия с задачами, триггерами и другими компонентами системы. | ||
|
||
| Команда | Описание | | ||
|---------------------------|------------------------------------------------------------------------------------------------------| | ||
| `command_enable_task` | Включение выполнения задачи. | | ||
| `command_disable_task` | Отключение выполнения задачи. | | ||
| `command_enable_trigger` | Включение триггера, активация возможности триггерирования. | | ||
| `command_disable_trigger` | Отключение триггера, приостановка возможности триггерирования. | | ||
| `event_call_trigger` | Инициирование события вызова триггера. | | ||
| `event_call_action` | Инициирование события вызова действия. | | ||
| `command_load_entity` | Загрузка сущности в систему. | | ||
| `command_unload_entity` | Выгрузка сущности из системы. | | ||
|
||
#### Пример использования: | ||
|
||
```javascript | ||
// Пример включения задачи | ||
PushSystemEvent('command_enable_task', { id: 1 }); | ||
|
||
// Пример вызова триггера | ||
PushSystemEvent('event_call_trigger', { id: 1 }); | ||
|
||
// Пример загрузки сущности | ||
PushSystemEvent('command_load_entity', { id: 'sensor.entity1' }); | ||
``` | ||
|
||
Эти команды предоставляют управление задачами, триггерами, вызов событий триггера и действия, а также загрузку и выгрузку сущностей в системе Smart Home. Их использование позволяет динамически управлять функциональностью системы и взаимодействовать с её компонентами. |