-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
43a1932
commit c1fb712
Showing
5 changed files
with
46 additions
and
5 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,18 @@ | ||
How to Build and Use Custom Automation | ||
======================================= | ||
|
||
NetEntityAutomation library provides a set of interfaces that can be used for creating custom automation. | ||
Such automations can be packed to the NuGet package. | ||
This is the way how users can share their automation with others. | ||
|
||
## Automation Interfaces | ||
|
||
There are several abstract classes that need to be implemented to create a custom automation: | ||
|
||
- `AutomationBase` - the base class for all automations. | ||
- `AutomationBase<TEntity>` - the base class for automations that work with specific entity type. | ||
This class is used for the most common cases. | ||
- `AutomationBase<TEntity, TFsm>` - the base class for automations that work with specific entity type and uses Finite State Machine (FSM). | ||
FSM in most cases is used for storing the current state of the automation to restore it after application restart (e.g. after system restart or crash). | ||
|
||
An example of usage of these classes can be found in the `NetEntityAutomation.Core.Automations` project (built-in automations) or in [example](https://github.com/x00Pavel/NetEntityAutomation-Custo-Automatation) repo with the entire NetDaemon application and custom automation. |
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 |
---|---|---|
@@ -1,3 +1,18 @@ | ||
# Room Controls | ||
|
||
The NetEntityAutomation creates several services for controlling automation in individual rooms. | ||
The NetEntityAutomation creates several services for controlling automation in individual rooms. | ||
|
||
> Currently, only toggle of all automations in the room is supported. | ||
The name of such service is in the format `netdaemon.toggle_<room_name>_service` | ||
where `<room_name>` is the name of the room in lower case with spaces replace by underscores. | ||
To call such service in Home Assistant, use the following service call: | ||
|
||
```yaml | ||
service: netdaemon.toggle_living_room_service | ||
data: {} | ||
``` | ||
> As only toggle action is supported, there is no need to specify any data. | ||
> This approach is used to simplify the service call. | ||
> In the future, more actions with data can be added to the service. |
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
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,8 @@ | ||
items: | ||
- name: How To Use | ||
href: how-to-use.md | ||
- name: Advanced | ||
items: | ||
- href: Advanced/room-service.md | ||
- name: Custom Automation | ||
href: Advanced/custom-automation.md |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
- name: Home | ||
href: index.md | ||
- name: Getting Started | ||
href: Docs/how-to-use.md | ||
href: ./index.md | ||
- name: User Manual | ||
href: Docs/ | ||
- name: API | ||
href: api/ |