From b88030871bb64ae030f936e224e0919735d30edf Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 24 Jan 2020 18:09:46 +0100 Subject: [PATCH] Remove deprecation warnings from 0.42 (#11861) --- source/_docs/automation/trigger.markdown | 6 -- source/_docs/configuration/events.markdown | 69 +++++++++------------- 2 files changed, 28 insertions(+), 47 deletions(-) diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index 448da488c73..329ad28ea60 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -22,12 +22,6 @@ automation: mood: happy ``` -
- -Starting 0.42, it is no longer possible to listen for event `homeassistant_start`. Use the 'homeassistant' platform below instead. - -
- ### Home Assistant trigger Triggers when Home Assistant starts up or shuts down. diff --git a/source/_docs/configuration/events.markdown b/source/_docs/configuration/events.markdown index 4d5de172b7f..14ce423dab9 100644 --- a/source/_docs/configuration/events.markdown +++ b/source/_docs/configuration/events.markdown @@ -8,62 +8,49 @@ The core of Home Assistant is the event bus. The event bus allows any integratio Home Assistant contains a few built-in events that are used to coordinate between various components. -### Event `homeassistant_start` -Event `homeassistant_start` is fired when all integrations from the configuration have been initialized. This is the event that will start the timer firing off `time_changed` events. - -
- - Starting 0.42, it is no longer possible to listen for event `homeassistant_start`. Use the 'homeassistant' [platform](/docs/automation/trigger) instead. - -
- -### Event `homeassistant_stop` -Event `homeassistant_stop` is fired when Home Assistant is shutting down. It should be used to close any open connection or release any resources. - - ### Event `state_changed` Event `state_changed` is fired when a state changes. Both `old_state` and `new_state` are state objects. [Documentation about state objects.](/topics/state_object/) -Field | Description ------ | ----------- -`entity_id` | Entity ID of the changed entity. Example: `light.kitchen` -`old_state` | The previous state of the entity before it changed. This field is omitted if the entity is new. -`new_state` | The new state of the entity. This field is omitted if the entity is removed from the state machine. +| Field | Description | +| ----------- | --------------------------------------------------------------------------------------------------- | +| `entity_id` | Entity ID of the changed entity. Example: `light.kitchen` | +| `old_state` | The previous state of the entity before it changed. This field is omitted if the entity is new. | +| `new_state` | The new state of the entity. This field is omitted if the entity is removed from the state machine. | ### Event `time_changed` Event `time_changed` is fired every second by the timer and contains the current time. -Field | Description ------ | ----------- -`now` | A [datetime object](https://docs.python.org/3.4/library/datetime.html#datetime.datetime) containing the current time in UTC. +| Field | Description | +| ----- | ---------------------------------------------------------------------------------------------------------------------------- | +| `now` | A [datetime object](https://docs.python.org/3.4/library/datetime.html#datetime.datetime) containing the current time in UTC. | ### Event `service_registered` Event `service_registered` is fired when a new service has been registered within Home Assistant. -Field | Description ------ | ----------- -`domain` | Domain of the service. Example: `light`. -`service` | The service to call. Example: `turn_on` +| Field | Description | +| --------- | ---------------------------------------- | +| `domain` | Domain of the service. Example: `light`. | +| `service` | The service to call. Example: `turn_on` | ### Event `call_service` Event `call_service` is fired to call a service. -Field | Description ------ | ----------- -`domain` | Domain of the service. Example: `light`. -`service` | The service to call. Example: `turn_on` -`service_data` | Dictionary with the service call parameters. Example: `{ 'brightness': 120 }`. -`service_call_id` | String with a unique call id. Example: `23123-4`. +| Field | Description | +| ----------------- | ------------------------------------------------------------------------------ | +| `domain` | Domain of the service. Example: `light`. | +| `service` | The service to call. Example: `turn_on` | +| `service_data` | Dictionary with the service call parameters. Example: `{ 'brightness': 120 }`. | +| `service_call_id` | String with a unique call id. Example: `23123-4`. | ### Event `service_executed` Event `service_executed` is fired by the service handler to indicate the service is done. -Field | Description ------ | ----------- -`service_call_id` | String with the unique call id of the service call that was executed. Example: `23123-4`. +| Field | Description | +| ----------------- | ----------------------------------------------------------------------------------------- | +| `service_call_id` | String with the unique call id of the service call that was executed. Example: `23123-4`. |
@@ -75,15 +62,15 @@ Field | Description Event `platform_discovered` is fired when a new platform has been discovered by the [`discovery`](/integrations/discovery/) component. -Field | Description ------ | ----------- -`service` | The platform that is discovered. Example: `zwave`. -`discovered` | Dictionary containing discovery information. Example: `{ "host": "192.168.1.10", "port": 8889}`. +| Field | Description | +| ------------ | ------------------------------------------------------------------------------------------------ | +| `service` | The platform that is discovered. Example: `zwave`. | +| `discovered` | Dictionary containing discovery information. Example: `{ "host": "192.168.1.10", "port": 8889}`. | ### Event `component_loaded` Event `component_loaded` is fired when a new integration has been loaded and initialized. -Field | Description ------ | ----------- -`component` | Domain of the integration that has just been initialized. Example: `light`. +| Field | Description | +| ----------- | --------------------------------------------------------------------------- | +| `component` | Domain of the integration that has just been initialized. Example: `light`. |