
* 🔥 Removes octopress.js * 🔥 Removes use of root_url var * 🔥 Removes Octopress generator reference from feed * 🔥 Removes delicious support * 🔥 Removes support for Pinboard * 🔥 Removes support for Disqus * 🔥 Removes support for Google Plus * ↩️ Migrate custom after_footer to default template * ↩️ Migrate custom footer to default template * ↩️ Migrate custom header to default template * 🔥 Removes unused template files * 🚀 Places time to read directly in post template * 🚀 Removes unneeded capture from archive_post.html template * 🔥 🚀 Removes unused, but heaving sorting call in component page * 🚀 Merged javascripts into a single file * 🔥 Removes more uses of root_url * 🚀 Removal of unneeded captures from head * 🔥 🚀 Removal of expensive liquid HTML compressor * 🔥 Removes unneeded templates * 🚀 Replaces kramdown with GitHub's CommonMark 🚀 * 💄 Adds Prism code syntax highlighting * ✨ Adds support for redirect in Netlify * ↩️ 🔥 Let Netlify handle all developer doc redirects * ✏️ Fixes typo in redirects file: Netify -> Netlify * 🔥 Removes unused .themes folder * 🔥 Removes unused aside.html template * 🔥 Removes Disqus config leftover * 🔥 Removes rouge highlighter config * 🔥 Removes Octopress 🎉 * 💄 Adjust code block font size and adds soft wraps * 💄 Adds styling for inline code blocks * 💄 Improve styling of note/warning/info boxes + div support * 🔨 Rewrites all note/warning/info boxes
3.5 KiB
title, description, redirect_from
title | description | redirect_from |
---|---|---|
Events | Describes all there is to know about events in Home Assistant. | /topics/events/ |
The core of Home Assistant is the event bus. The event bus allows any integration to fire or listen for events. It is the core of everything. For example, any state change will be announced on the event bus as a state_changed
event containing the previous and the new state of an entity.
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 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.
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 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 |
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 . |
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 . |
Starting with 0.84, it is no longer possible to listen for event service_executed
.
Event platform_discovered
Event platform_discovered
is fired when a new platform has been discovered by the 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} . |
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 . |