Apache Kafka
The apache_kafka
integration sends all state changes to a
Apache Kafka topic.
Apache Kafka is a real-time data pipeline that can read and write streams of data. It stores its data safely in a distributed, replicated, fault-tolerant cluster.
To use the apache_kafka
integration in your installation, add the following to your
configuration.yaml
file:
apache_kafka:
ip_address: localhost
port: 9092
topic: home_assistant_1
Configuration Variables
The protocol used to communicate with brokers. Use SASL_SSL
for authentication.
Filters for entities to be included/excluded. (Configure Filter)
Configure Filter
By default, no entity will be excluded. To limit which entities are being exposed to Apache Kafka
, you can use the filter
parameter.
# Example filter to include specified domains and exclude specified entities
apache_kafka:
ip_address: localhost
port: 9092
topic: home_assistant_1
filter:
include_domains:
- alarm_control_panel
- light
include_entity_globs:
- binary_sensor.*_occupancy
exclude_entities:
- light.kitchen_light
Filters are applied as follows:
- No filter
- All entities included
- Only includes
- Entity listed in entities include: include
- Otherwise, entity matches domain include: include
- Otherwise, entity matches glob include: include
- Otherwise: exclude
- Only excludes
- Entity listed in exclude: exclude
- Otherwise, entity matches domain exclude: exclude
- Otherwise, entity matches glob exclude: exclude
- Otherwise: include
- Domain and/or glob includes (may also have excludes)
- Entity listed in entities include: include
- Otherwise, entity listed in entities exclude: exclude
- Otherwise, entity matches glob include: include
- Otherwise, entity matches glob exclude: exclude
- Otherwise, entity matches domain include: include
- Otherwise: exclude
- Domain and/or glob excludes (no domain and/or glob includes)
- Entity listed in entities include: include
- Otherwise, entity listed in exclude: exclude
- Otherwise, entity matches glob exclude: exclude
- Otherwise, entity matches domain exclude: exclude
- Otherwise: include
- No Domain and/or glob includes or excludes
- Entity listed in entities include: include
- Otherwise: exclude
The following characters can be used in entity globs:
*
- The asterisk represents zero, one, or multiple characters
?
- The question mark represents a single character