Skip to content

Initial draft device automations docs#321

Merged
balloob merged 8 commits into
masterfrom
device-automations
Sep 25, 2019
Merged

Initial draft device automations docs#321
balloob merged 8 commits into
masterfrom
device-automations

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Sep 24, 2019

Just a quick write up. Relies on home-assistant/core#26880

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to talk about when integrations need to define new device automations. The base components already provide some standard device automations, right?

Comment thread docs/device_automation_action.md Outdated
sidebar_label: Actions
---

Device actions allow a user to have a device to something. Examples are to turn a light on or open the door.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to have a device do something.

Comment thread docs/device_automation_condition.md Outdated

Device conditions allow a user to check if a certain device condition is met. Examples are is a light on or is the floor wet.

Device conditions are defined as dictionaries. These dictionaries are created by your integration and are passed to your integration to createa a function that checks the condition.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to create a function that checks

Comment thread docs/device_automation_condition.md Outdated

## `async async_condition_from_config(config, config_validation)`

Create a condition function from a function. The condition functions should be an async-friendly callback that
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing end of sentence.

Comment thread docs/device_automation_index.md Outdated
sidebar_label: Introduction
---

Device Automations provides users with a device-centric layer on top of the core concepts of Home Assistant. When creating automations, users no longer have to deal with core concepts like states and events. Instead, they will be able to pick a device and then pick from a list of pre-defined triggers, conditions and actions.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Device Automations provide users

Comment thread docs/device_automation_index.md Outdated

Device Automations provides users with a device-centric layer on top of the core concepts of Home Assistant. When creating automations, users no longer have to deal with core concepts like states and events. Instead, they will be able to pick a device and then pick from a list of pre-defined triggers, conditions and actions.

Integrations can hook in this system by exposing functions to generate the pre-defined triggers, conditions, actions and having functions that can listen for the triggers, check the condition and execute the action.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integrations can hook into this system

Comment thread docs/device_automation_index.md Outdated

Integrations can hook in this system by exposing functions to generate the pre-defined triggers, conditions, actions and having functions that can listen for the triggers, check the condition and execute the action.

Device automations are not exposing extra functionality but are a way for users to not have to learn new concepts. Device automatoins are using events, state and service helpers under the hood.
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare Sep 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Device automations are using events, state and service helpers under the hood.

@emontnemery
Copy link
Copy Markdown
Contributor

It would be good to talk about when integrations need to define new device automations. The base components already provide some standard device automations, right?

Yeah, @MartinHjelmare do you have any suggestion for wording?

I added a note like this:

Device triggers can be provided by the integration that provides the device (e.g. ZHA, deCONZ) or the entity integrations that the device has entities with (e.g. light, switch).
An example of the former is events not tied to an entity e.g. key press on a remote control or touch panel, while an example of the latter could be that a light has been turned on.

@MartinHjelmare
Copy link
Copy Markdown
Member

I think it's good. But we're not consistent as a whole in the dev docs about how we name the entity integrations. In the architecture section we call these components. In the backend section we call them entity integrations.

@balloob
Copy link
Copy Markdown
Member Author

balloob commented Sep 25, 2019

Yeah I think that's an artifact from our component past. I think that we should go with entity integrations

@balloob balloob merged commit c025ed1 into master Sep 25, 2019
@delete-merged-branch delete-merged-branch Bot deleted the device-automations branch September 25, 2019 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants