release 99.3

This commit is contained in:
Paulus Schoutsen 2019-09-27 11:53:51 -07:00
parent 9a886d65cd
commit 5b24a83c81
8 changed files with 324 additions and 0 deletions

View File

@ -1651,6 +1651,25 @@
},
"version-0.99.0/version-0.99.0-lovelace_custom_card": {
"title": "Lovelace: Custom Cards"
},
"version-0.99.3/version-0.99.3-device_automation_action": {
"title": "Device Actions",
"sidebar_label": "Actions"
},
"version-0.99.3/version-0.99.3-device_automation_condition": {
"title": "Device Conditions",
"sidebar_label": "Conditions"
},
"version-0.99.3/version-0.99.3-device_automation_index": {
"title": "Device Automations",
"sidebar_label": "Introduction"
},
"version-0.99.3/version-0.99.3-device_automation_trigger": {
"title": "Device Triggers",
"sidebar_label": "Triggers"
},
"version-0.99.3/version-0.99.3-reproduce_state_index": {
"title": "Reproduce State / Scene support"
}
},
"links": {

View File

@ -0,0 +1,29 @@
---
title: Device Actions
sidebar_label: Actions
id: version-0.99.3-device_automation_action
original_id: device_automation_action
---
Device actions allow a user to have a device do something. Examples are to turn a light on or open a door.
Device actions are defined as dictionaries. These dictionaries are created by your integration and are passed to your integration to create a function that performs the action.
Device actions 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 could be to reboot the device, while an example of the latter could be to turn a light on.
Home Assistant includes a template to get started with device actions. To get started, run inside a development environment `python3 -m script.scaffold device_action`.
The template will create a new file `device_action.py` in your integration folder and a matching test file. The file contains the following functions and constants:
## `ACTION_SCHEMA`
This is the schema for actions. The base schema should be extended from `homeassistant.helpers.config_validation.DEVICE_ACTION_BASE_SCHEMA`.
## `async async async_get_actions(hass, device_id)`
Return a list of actions that this device supports.
## `async async_call_action_from_config(hass, config, variables, context)`
Execute the passed in action.

View File

@ -0,0 +1,29 @@
---
title: Device Conditions
sidebar_label: Conditions
id: version-0.99.3-device_automation_condition
original_id: device_automation_condition
---
Device conditions allow a user to check if a certain 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 create a a function that checks the condition.
Device conditions 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, humidity sensor).
An example of the latter could be to check if a light is on or the floor is wet.
Home Assistant includes a template to get started with device conditions. To get started, run inside a development environment `python3 -m script.scaffold device_condition`.
The template will create a new file `device_condition.py` in your integration folder and a matching test file. The file contains the following functions and constants:
## `CONDITION_SCHEMA`
This is the schema for conditions. The base schema should be extended from `homeassistant.helpers.config_validation.DEVICE_CONDITION_BASE_SCHEMA`.
## `async async_get_conditions(hass, device_id)`
Return a list of conditions that this device supports.
## `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 evaluates the condition and returns a `bool`.

View File

@ -0,0 +1,12 @@
---
title: Device Automations
sidebar_label: Introduction
id: version-0.99.3-device_automation_index
original_id: device_automation_index
---
Device Automations provide 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 into 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 automations are using events, state and service helpers under the hood.

View File

@ -0,0 +1,29 @@
---
title: Device Triggers
sidebar_label: Triggers
id: version-0.99.3-device_automation_trigger
original_id: device_automation_trigger
---
Device triggers are automation triggers that are tied to a specific device. Examples are "light turned on" or "water detected".
Device triggers are defined as dictionaries. These dictionaries are created by your integration and are consumed by your integration to attach the trigger.
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.
Home Assistant includes a template to get started with device triggers. To get started, run inside a development environment `python3 -m script.scaffold device_trigger`.
The template will create a new file `device_trigger.py` in your integration folder and a matching test file. The file contains the following functions and constants:
## `TRIGGER_SCHEMA`
This is a voluptuous schema that verifies that a specific dictionary represents a config that your integration can handle. This should extend the TRIGGER_BASE_SCHEMA from `device_automation/__init__.py`.
## `async async_get_triggers(hass, device_id)`
Return a list of triggers.
## `async async_attach_trigger(hass, config, action, automation_info)`
Given one of your own trigger configs, make it so the `action` is called whenever the trigger is triggered. Return value is a function that detaches the trigger.

View File

@ -0,0 +1,28 @@
---
title: Reproduce State / Scene support
id: version-0.99.3-reproduce_state_index
original_id: reproduce_state_index
---
Home Assistant has support for scenes. Scenes are a collection of (partial) entity states. When a scene is activated, Home Assistant will try to call the right services to get the specified scenes in their specified state.
Integrations are responsible for adding support to Home Assistant to be able to call the right services to reproduce the states in a scene.
## Adding support
The quickest way to add reproduce state support to a new integration is by using our built-in scaffold template. From a Home Assistant dev environment, run `python3 -m script.scaffold reproduce_state` and follow the instructions.
If you prefer to go the manual route, create a new file in your integration folder called `reproduce_state.py` and implement the following method:
```python
import asyncio
from typing import Iterable, Optional
from homeassistant.core import Context, State
from homeassistant.helpers.typing import HomeAssistantType
async def async_reproduce_states(
hass: HomeAssistantType, states: Iterable[State], context: Optional[Context] = None
) -> None:
"""Reproduce component states."""
# TODO reproduce states
```

View File

@ -0,0 +1,177 @@
{
"version-0.99.3-Architecture": {
"Architecture": [
"version-0.99.3-architecture_index",
"version-0.99.3-architecture_components",
"version-0.99.3-architecture_entities",
"version-0.99.3-architecture_hassio"
],
"Entities": [
"version-0.99.3-entity_index",
"version-0.99.3-entity_air_quality",
"version-0.99.3-entity_alarm_control_panel",
"version-0.99.3-entity_binary_sensor",
"version-0.99.3-entity_climate",
"version-0.99.3-entity_cover",
"version-0.99.3-entity_fan",
"version-0.99.3-entity_light",
"version-0.99.3-entity_lock",
"version-0.99.3-entity_media_player",
"version-0.99.3-entity_remote",
"version-0.99.3-entity_sensor",
"version-0.99.3-entity_switch",
"version-0.99.3-entity_vacuum",
"version-0.99.3-entity_water_heater",
"version-0.99.3-entity_weather"
],
"Authentication": [
"version-0.99.3-auth_index",
"version-0.99.3-auth_permissions",
"version-0.99.3-auth_api",
"version-0.99.3-auth_auth_provider",
"version-0.99.3-auth_auth_module"
],
"Config Entries": [
"version-0.99.3-config_entries_index"
],
"Data Entry Flow": [
"version-0.99.3-data_entry_flow_index"
],
"Entity Registry": [
"version-0.99.3-entity_registry_index",
"version-0.99.3-entity_registry_disabled_by"
],
"Device Registry": [
"version-0.99.3-device_registry_index"
],
"Area Registry": [
"version-0.99.3-area_registry_index"
]
},
"version-0.99.3-Extending Frontend": {
"Frontend": [
"version-0.99.3-frontend_index",
"version-0.99.3-frontend_architecture",
"version-0.99.3-frontend_development",
"version-0.99.3-frontend_data",
"version-0.99.3-frontend_external_auth",
"version-0.99.3-frontend_external_bus"
],
"Extending the frontend": [
"version-0.99.3-frontend_add_card",
"version-0.99.3-frontend_add_more_info",
"version-0.99.3-frontend_add_websocket_api"
],
"Custom UI": [
"version-0.99.3-lovelace_custom_card",
"version-0.99.3-frontend_creating_custom_panels"
]
},
"version-0.99.3-Extending HASS": {
"Development Workflow": [
"version-0.99.3-development_index",
"version-0.99.3-development_environment",
"version-0.99.3-development_submitting",
"version-0.99.3-development_guidelines",
"version-0.99.3-development_testing",
"version-0.99.3-development_catching_up"
],
"Building Integrations": [
"version-0.99.3-creating_integration_file_structure",
"version-0.99.3-creating_integration_manifest",
"version-0.99.3-creating_component_index",
"version-0.99.3-config_entries_config_flow_handler",
"version-0.99.3-config_entries_options_flow_handler",
"version-0.99.3-configuration_yaml_index",
"version-0.99.3-dev_101_services",
"version-0.99.3-creating_platform_index",
"version-0.99.3-creating_component_generic_discovery",
"version-0.99.3-reproduce_state_index"
],
"Development Checklist": [
"version-0.99.3-development_checklist",
"version-0.99.3-creating_component_code_review",
"version-0.99.3-creating_platform_code_review",
"version-0.99.3-integration_quality_scale_index"
],
"Home Assistant Core 101": [
"version-0.99.3-dev_101_index",
"version-0.99.3-dev_101_hass",
"version-0.99.3-dev_101_events",
"version-0.99.3-dev_101_states",
"version-0.99.3-dev_101_config"
],
"Device Automations": [
"version-0.99.3-device_automation_index",
"version-0.99.3-device_automation_trigger",
"version-0.99.3-device_automation_condition",
"version-0.99.3-device_automation_action"
],
"Misc": [
"version-0.99.3-development_validation",
"version-0.99.3-development_typing"
]
},
"version-0.99.3-Misc": {
"Introduction": [
"version-0.99.3-misc"
],
"External API": [
"version-0.99.3-external_api_rest",
"version-0.99.3-external_api_rest_python",
"version-0.99.3-external_api_websocket",
"version-0.99.3-external_api_server_sent_events"
],
"Internationalization": [
"version-0.99.3-internationalization_index",
"version-0.99.3-internationalization_backend_localization",
"version-0.99.3-internationalization_custom_component_localization",
"version-0.99.3-internationalization_translation"
],
"Documentation": [
"version-0.99.3-documentation_index",
"version-0.99.3-documentation_standards",
"version-0.99.3-documentation_create_page"
],
"Intents": [
"version-0.99.3-intent_index",
"version-0.99.3-intent_firing",
"version-0.99.3-intent_handling",
"version-0.99.3-intent_conversation",
"version-0.99.3-intent_builtin"
],
"Native App Integration": [
"version-0.99.3-app_integration_index",
"version-0.99.3-app_integration_setup",
"version-0.99.3-app_integration_sending_data",
"version-0.99.3-app_integration_sensors",
"version-0.99.3-app_integration_notifications",
"version-0.99.3-app_integration_webview"
],
"asyncio": [
"version-0.99.3-asyncio_index",
"version-0.99.3-asyncio_101",
"version-0.99.3-asyncio_categorizing_functions",
"version-0.99.3-asyncio_working_with_async"
],
"Hass.io": [
"version-0.99.3-hassio_debugging",
"version-0.99.3-hassio_hass"
],
"Hass.io Add-Ons": [
"version-0.99.3-hassio_addon_index",
"version-0.99.3-hassio_addon_tutorial",
"version-0.99.3-hassio_addon_config",
"version-0.99.3-hassio_addon_communication",
"version-0.99.3-hassio_addon_testing",
"version-0.99.3-hassio_addon_publishing",
"version-0.99.3-hassio_addon_presentation",
"version-0.99.3-hassio_addon_repository",
"version-0.99.3-hassio_addon_security"
],
"Maintainer docs": [
"version-0.99.3-maintenance",
"version-0.99.3-releasing"
]
}
}

View File

@ -1,4 +1,5 @@
[
"0.99.3",
"0.99.0",
"0.98.0",
"0.97.0",