The KNX integration connects Home Assistant to your KNX installation

The KNX integration connects Home Assistant to your KNX installation, allowing you to control KNX devices, act on telegrams and forward state changes from other integrations entities to your KNX bus.

This integration requires a local KNX/IP interface or router to establish the connection between Home Assistant and your KNX bus.

There is currently support for the following device types within Home Assistant:

Configuration 

To add the KNX hub to your Home Assistant instance, use this My button:

 Manual configuration steps
 

If the above My button doesn’t work, you can also perform the following steps manually:

KNX Connection 

Select the connection type to your KNX bus. The integration supports the following connection methods:

  • ‘Automatic’ performs a gateway scan on start, to find a KNX IP interface. It will connect via a tunnel. This option is not available when a gateway scan at setup initiation was not successful.
  • ‘Tunneling’ will connect to a specific KNX IP interface over a tunnel.
  • ‘Routing’ will use Multicast to communicate with KNX IP routers.

For more information about KNX connection types see Connection.

Tunneling specific settings 

You can select a specific tunnel device if multiple were found during the setup. In case no device was discovered, you can configure connection information manually.

KNX tunneling type

UDPTCP or Secure Tunneling

Host

IP address or hostname of the KNX/IP tunneling device.

Port

Port used by the KNX/IP tunneling device.

Route back / NAT mode

Enable if your KNXnet/IP tunneling server is behind NAT. Only applies for UDP connections.

Local IP interface

Local IP or interface name used for the connection from Home Assistant. Leave blank to use auto-discovery.

Tunnel endpoint 

Select the tunnel endpoint used for the connection. This step is only available for TCP or Secure Tunneling connection types.

Routing specific settings 

Individual address

KNX individual address to be used by Home Assistant to send telegrams. This shall not be used by any other device in your installation.

KNX IP Secure Routing

Select if your installation uses encrypted communication according to the KNX IP Secure standard. This setting requires compatible devices and configuration. You’ll be prompted for credentials in the next step.

Multicast group

Multicast group used by your installation. Default is 224.0.23.12

Multicast port

Multicast port used by your installation. Default is 3671

Local IP interface

Local IP or interface name used for the connection from Home Assistant. Leave blank to use auto-discovery.

KNX IP Secure specific settings 

See Connection on how to get the files or keys needed for this configuration step.

Reconfiguration 

You can change your KNX connection configuration at any time through the integration settings. This is useful when you need to update the Keyring file or switch to a different connection type.

  1. Go to  Settings > Devices & services.
  2. Select KNX.
  3. Click the three-dot  menu and then select Reconfigure.

Configure KNX interface 

Reconfigure your connection settings. See above for more information.

Import KNX Keyring 

Provide a new keyring file to be used by the integration. See KNX Secure on how to get this file.

Options 

Options for KNX can be set via the user interface, by taking the following steps:

  • Browse to your Home Assistant instance.
  • Go to Settings > Devices & Services.
  • If multiple instances of KNX are configured, choose the instance you want to configure.
  • Select the integration, then select Configure.
State updater

Sets the default behavior for periodically reading state addresses from the KNX Bus.

Rate limit

Maximum outgoing telegrams per second. 0 to disable limit – which is recommended.

Telegram history limit

Number of Telegrams to keep in memory for the KNX panels group monitor.

Basic configuration 

In order to make use of the various platforms offered by the KNX integration, you will need to set them up via the KNX panel or add the corresponding configuration yaml to your configuration.yaml. See Splitting up the configuration if you like to arrange YAML parts in dedicated files. After changing the configuration.yaml file, restart Home Assistant to apply the changes. The integration is now shown on the integrations page under Settings > Devices & services. Its entities are listed on the integration card itself and on the Entities tab.

knx:
  # configure platforms directly in configuration.yaml
  binary_sensor:
    - name: "My first binary sensor"
      state_address: "1/2/3"
    # etc...
  # or outsource platform configuration to separate files
  sensor: !include knx_sensor.yaml
YAML
 

Please see the dedicated platform sections below about how to configure them correctly.

Group addresses 

Group addresses are configured as strings or integers in the format “1/2/3” for 3-level GA-structure, “1/2” for 2-level GA-structure or “1” for free GA-structure.

The HA KNX integration uses configured state_address or *_state_address to update the state of a function. These addresses are read by GroupValueRead requests on startup and when there was no incoming telegram for one hour (default sync_state).

It is possible to configure passive/listening group addresses for all functions of every KNX platform (except expose and notify). This allows having multiple group addresses to update the state of its function (e.g., the brightness of a light). When group addresses are configured as a list of strings, the first item is the active sending or state-reading address and the rest is registered as passive addresses. This schema behaves like in ETS configuration where the first is the “sending” address and others are just for updating the group object.

If your KNX device provides active state group objects it is advised to use *_state_address instead of passive addresses as it reduces configuration complexity and avoids wrong states (e.g., when channels are logically locked).

knx:
  switch:
    - name: "Switch without passive addresses"
      address: "1/1/1" # this is the address that will be sent to
      state_address: "8/8/8"  # this is the address GroupValueRead requests are sent to
    - name: "Switch with passive addresses"
      address:
        - "1/1/1" # this is the address that will be sent to
        - "1/1/2" # this and following are passive addresses
        - "1/1/3"
      state_address:
        - "8/8/8" # this is the address GroupValueRead requests are sent to
        - "8/8/2" # this and following are passive addresses
        - "8/8/3"
YAML
 

Connection 

Connection parameters are configured during integration setup and can be modified later in the integrations settings.

KNX Secure 

The KNX integration supports both IP Secure and Data Secure.

IP Secure 

IP Secure credentials can be provided in two ways:

  1. Using a .knxkeys file: This file can be exported from ETS and imported into the integration settings.
  2. Manual configuration: If you are not using Data Secure, you can manually input the required IP Secure credentials in the integration settings.

Data Secure 

Data Secure credentials are always sourced from a .knxkeys file. You can import or update the Keyring file from the integrations settings.

 Important

Assign all secured group addresses that Home Assistant will use to either the interface’s tunnel endpoint or a dummy device in ETS before exporting the Keyring file.

When updating secure groups, ensure all participating devices, routers, and couplers applications are updated as well. After making changes, load the updated Keyring file into Home Assistant.

Tunneling 

Tunneling uses a KNX IP Interface to connect to the KNX bus. Most KNX IP Routers also support tunneling connections. This is the recommended connection type and is also used when selecting an “Automatic” connection in the integration setup.

For modern interfaces (supporting TCP or IP Secure) you can select a specific tunnel endpoint to be used. Make sure that Home Assistant is the only client connecting to this tunnel endpoint. In ETS it is recommended to connect the group addresses you want to use to the tunnel endpoint that Home Assistant uses. For secure group addresses, this is mandatory.

If you use KNX IP Secure tunneling or Data Secure, export the Keyring file from ETS and import it in the KNX integration settings.

Tunnel endpoint setup in ETS 6

 Note

If you want Home Assistant to use a specific individual address, you can change the address of the used tunnel endpoint in ETS.

Manual IP Secure tunneling credentials
 

If you opt for manual configuration of IP Secure tunneling, you will need the following:

  1. User-ID: Use a User-ID of 2 or higher. (IDs 0 and 1 are reserved). The first tunnel endpoint in ETS will typically use User-ID 2, the second 3, and so on.
  2. User password.
  3. Device authentication code (optional).

Obtain the tunnel User-ID and password in ETS

The following screenshot will show how you can find the device authentication code in ETS.

Obtain device authentication code in ETS

Routing 

Routing communicates with KNXnet/IP routers via IP Multicast.

When using routing:

  1. Add a dummy device in ETS at the same topology level as your routers.
  2. Assign this dummy device the same individual address configured in the KNX integration setup.
  3. Connect all group addresses that Home Assistant will use to the dummy device. This ensures routers and couplers maintain updated filter tables and enables the use of secure group addresses in Home Assistant.
  4. If you use KNX IP Secure routing or Data Secure groups, export the Keyring file from ETS and import it in the KNX integration settings.

Routing dummy setup in ETS 6

Manual IP Secure routing credentials
 

If you opt for manual configuration of IP Secure routing, you will need the backbone key. This can be found in the ETS “Project Security” report.

Backbone key in ETS Project Security report

Data updates 

This integration uses the KNX/IP protocol to receive telegrams live as they appear on the bus. When the integration is loaded, it actively requests data needed to initialize the configured entities. See Group Addresses for more details.

States of diagnostic entities of the “KNX Interface” device are polled every 10 seconds.

Triggers 

The KNX integration provides its own trigger platform which can be used in automations.

Telegram trigger 

The knx.telegram trigger can be used to trigger automations on incoming or outgoing KNX telegrams.

 Note

This trigger is also provided as a device trigger by the KNX Interface device. It supports setting the options in the automation builder UI, but doesn’t support setting a specific DPT (type) to decode the payload as it always relies on project data.

Configuration Variables 

destination string | list (Optional)

A group address or a list of group addresses the trigger should listen on. If not set, or an empty list, the trigger will listen on all group addresses.

type string | integer (Optional)

If set, the payload will be decoded as given DPT in the trigger data. When not set, the DPT is sourced from project data. KNX sensor types are valid values KNX Sensor (e.g., “2byte_float” or “percent”).

group_value_write boolean (Optional, default: true)

If set to false, the trigger will not fire on GroupValueWrite telegrams.

group_value_response boolean (Optional, default: true)

If set to false, the trigger will not fire on GroupValueResponse telegrams.

group_value_read boolean (Optional, default: true)

If set to false, the trigger will not fire on GroupValueRead telegrams.

incoming boolean (Optional, default: true)

If set to false, the trigger will not fire on incoming telegrams.

outgoing boolean (Optional, default: true)

If set to false, the trigger will not fire on outgoing telegrams.

Available trigger data 

In addition to the standard automation trigger data, the knx.telegram trigger platform has additional trigger data available for use.

  • trigger.destination Destination group address
  • trigger.destination_name Destination group address name
  • trigger.direction Telegram direction
  • trigger.dpt_main Destination group address main datapoint type number
  • trigger.dpt_sub Destination group address sub datapoint type number
  • trigger.dpt_name DPT value type name – see Sensor value types
  • trigger.payload Raw telegram payload. DPT 1, 2, and 3 yield integers 0..255; other DPT yield lists of integers 0..255
  • trigger.source Source individual address
  • trigger.source_name Source name
  • trigger.telegramtype APCI type of telegram
  • trigger.timestamp Timestamp
  • trigger.unit Unit according to group address DPT
  • trigger.value Decoded telegram payload according to DPT
Template variableTypeProject data required
trigger.destinationstringno
trigger.destination_namestringyes
trigger.directionstringno
trigger.dpt_mainintegeryes
trigger.dpt_subintegeryes
trigger.dpt_namestringyes
trigger.payloadinteger or list of integersno
trigger.sourcestringno
trigger.source_namestringyes
trigger.telegramtypestringno
trigger.timestamptimestampno
trigger.unitstringyes
trigger.valueanyyes

For values that require project data: if the information was not found, or if no project file was provided, data will be set to null.

Examples 

Example automation configuration

- alias: "Single group address trigger"
  triggers:
    - trigger: knx.telegram
      destination: 1/2/3
      group_value_read: false
      outgoing: false
  conditions: "{{ trigger.value == 0 }}"
  actions: []
YAML
 

Example trigger data

variables:
  triggers:
    id: "0"
    idx: "0"
    alias: null
    destination: 1/2/3
    destination_name: Light office brightness
    direction: Incoming
    dpt_main: 5
    dpt_sub: 1
    dpt_name: percent
    payload:
      - 255
    source: 1.0.51
    source_name: Dimming actuator 1
    telegramtype: GroupValueWrite
    timestamp: "2024-01-09T10:38:28.447487+01:00"
    unit: "%"
    value: 100
context: null
YAML
 

Events 

 Tip

For automation triggers, it is recommended to use the knx.telegram trigger instead of knx_event.

knx:
  event:
    - address:
        - "0/1/*"
    - address:
        - "1/2/*"
        - "1/3/2-4"
      type: "2byte_unsigned"
    - address:
        - "3/4/5"
      type: "2byte_float"
YAML
 

Configuration Variables 

address list | string Required

Defines a list of patterns for matching KNX group addresses. Telegrams with destination addresses matching one of the patterns are sent to the Home Assistant event bus as knx_event.

type string | integer (Optional)

Telegram payloads in knx_event events will be decoded using the configured type (DPT) for the addresses in the same block. The decoded value will be written to the event data value key. If not configured the value key will be None – the data key will still hold the raw payload (use this for DPT 1, 2, 3). All sensor types are valid types – see KNX Sensor (e.g., “2byte_float” or “1byte_signed”).

Every telegram that matches an address pattern with its destination field will be announced on the event bus as a knx_event event containing data attributes

  • data contains the raw payload data (e.g., 1 or “[12, 55]”).
  • destination the KNX group address the telegram is sent to as string (e.g., “1/2/3”).
  • direction the direction of the telegram as string (“Incoming” / “Outgoing”).
  • source the KNX individual address of the sender as string (e.g., “1.2.3”).
  • telegramtype the APCI service of the telegram. “GroupValueWrite”, “GroupValueRead” or “GroupValueResponse” generate a knx_event.
  • value contains the decoded payload value if type is configured for the address. Will be None for “GroupValueRead” telegrams.

Actions 

In order to directly interact with the KNX bus, you can use the following actions:

Send 

Domain: knx
Action: send
Data: {"address": "1/0/15", "payload": 0, "type": "temperature"}
Txt
 

Configuration Variables 

address string

KNX group address.

payload integer | list

Payload to send to the bus. When type is not set, raw bytes are sent. Integers are then treated as DPT 1/2/3 payloads. For DPTs > 6 bits send a list. Each value represents 1 octet (0-255). Pad with 0 to DPT byte length.

type string | integer | float

If set, the payload will not be sent as raw bytes, but encoded as given DPT. KNX sensor types are valid values – see table in KNX Sensor.

response boolean

If set to true, the telegram will be sent as a GroupValueResponse instead of a GroupValueWrite.

# Example script to send a fixed value and the state of an entity
alias: "My Script"
sequence:
  - action: knx.send
    data:
      address: 1/1/1
      type: percent
      payload: 50
      response: false
  - action: knx.send
    data:
      address: 1/1/1
      payload: [128]  # 50 % as 1-byte raw value
      response: false
  - action: knx.send
    data:
      address: 3/3/3
      type: temperature
      payload: "{{ states('sensor.dew_point') }}"
      response: false
YAML
 

Read 

You can use the homeassistant.update_entity action call to issue GroupValueRead requests for all *state_address of an entity. To manually send GroupValueRead requests, use the knx.read action. The response can be used in automations by the knx.telegram trigger and it will be processed in KNX entities.

Domain: knx
Action: read
Data: {"address": "1/0/15"}
Txt
 

Configuration Variables 

address string | list

Group address(es) to send read request to. Lists will read multiple group addresses.

# Example automation to update a cover position after 10 seconds of movement initiation
automation:
  - triggers:
      - trigger: knx.telegram
        # Cover move trigger
        destination: "0/4/20"
    actions:
      - delay: 0:0:10
      - action: knx.read
        data:
          # Cover position address
          address: "0/4/21"

  - triggers:
      - trigger: homeassistant
        event: start
    actions:
      # Register the group address to trigger a knx_event
      - action: knx.event_register
        data:
          # Cover move trigger
          address: "0/4/20"
YAML
 

Register event 

The knx.event_register action can be used to register (or unregister) group addresses to fire knx_event Events. Events for group addresses configured in the event key in configuration.yaml cannot be unregistered. See knx_event

Configuration Variables 

address string | list Required

Group address that shall be added or removed.

remove boolean (Optional, default: false)

If true the group address will be removed.

type string | integer (Optional)

If set, the payload will be decoded as given DPT in the event data value key. KNX sensor types are valid values KNX Sensor (e.g., “2byte_float” or “1byte_signed”).

Register exposure 

The knx.exposure_register action can be used to register (or unregister) exposures to the KNX bus. Exposures defined in configuration.yaml can not be unregistered. Per address only one exposure can be registered. See expose

Configuration Variables 

remove boolean (Optional, default: false)

In addition to the configuration variables of expose remove set to true can be used to remove exposures. Only address is required for removal.

Exposing entity states, entity attributes or time to KNX bus 

KNX integration is able to expose entity states or attributes to KNX bus. The integration will broadcast any change of the exposed value to the KNX bus and answer read requests to the specified group address. It is also possible to expose the current time and date. These are sent to the bus every hour.

 Tip

Expose is only triggered on state changes. If you need periodical telegrams, use an automation with the knx.send action to send the value to the bus.

# Example configuration.yaml entry
knx:
  expose:
    # time and date exposures
    - type: time
      address: "0/0/1"
    # entitiy exposures
    - type: temperature
      entity_id: sensor.owm_temperature
      address: "0/0/2"
      cooldown: 600
    - type: string
      address: "0/6/4"
      entity_id: sensor.owm_weather
    - type: binary
      entity_id: binary_sensor.kitchen_window
      address: "0/6/5"
    - type: binary
      entity_id: light.office
      address: "0/3/0"
      default: false
    - type: percentU8
      entity_id: light.office
      attribute: brightness
      default: 0
      address: "0/3/1"
    - type: percent
      address: "1/1/1"
      entity_id: cover.office
      attribute: current_position
      value_template: "{{ 100 - value }}"  # invert the value
    - type: percent
      address: "2/2/2"
      entity_id: media_player.kitchen
      attribute: volume_level
      value_template: "{{ value * 100 }}"  # convert from 0..1 to percent
YAML
 

Configuration Variables 

address string Required

Group address state or attribute updates will be sent to. GroupValueRead requests will be answered. For types timedate, and datetimeaddress is the only valid configuration variable..

type string | integer Required

Type of the exposed value. Either binarytime DPT 10.001date DPT 11.001datetime DPT 19.001 or any supported type of KNX Sensor (e.g., “temperature” or “humidity”).

entity_id string (Optional)

Entity ID to be exposed. Shall not be used for types timedate, and datetime.

attribute string (Optional)

Attribute of the entity that shall be sent to the KNX bus. If not set (or None) the state will be sent. For example for a light the state is either “on” or “off”. With attribute you can expose its “brightness”. Shall not be used for types timedate, and datetime.

default boolean | string | integer | float (Optional, default: None)

Default value to send to the bus if the state or attribute value is None. For example a light with state “off” has no brightness attribute so a default value of 0 could be used. If not set (or None) no value would be sent to the bus and a GroupReadRequest to the address would return the last known value. Shall not be used for types timedate, and datetime.

value_template template (Optional, default: None)

A template to process the value before sending it to the KNX bus. The template has access to the entity state or attribute value as value. Shall not be used for types timedate, and datetime.

cooldown float (Optional, default: 0)

Minimum time in seconds between two sent telegrams. This can be used to avoid flooding the KNX bus when exposing frequently changing states. If the state changes multiple times within the cooldown period the most recent value will be sent. Shall not be used for types timedate, and datetime.

respond_to_read boolean (Optional, default: true)

Respond to GroupValueRead telegrams received to the configured address. Shall not be used for types timedate, and datetime.

Binary sensor 

The KNX binary sensor platform allows you to monitor KNX binary sensors like window/door contacts, motion detectors, alarms, etc.

 Note

Binary sensors are read-only entities. To write to the KNX bus, configure a KNX Switch entity or use the knx.send action.

Binary sensor entities can be created from the frontend in the KNX panel or via YAML.

Configuration of KNX binary sensor entities via YAML
 
knx:
  binary_sensor:
    - name: "Sensor 1"
      state_address: "6/0/2"
YAML
 

Configuration Variables 

state_address string | list Required

KNX group address of the binary sensor. DPT 1

name string (Optional)

A name for this device used within Home Assistant.

sync_state boolean | string | integer (Optional, default: true)

Actively read the value from the bus. The maximum time interval (<minutes>) is 1440. The following values are valid

  • true equivalent to “expire 60” (default)
  • false no GroupValueRead telegrams will be sent to the bus
  • every <minutes> to update it regularly every <minutes>
  • expire <minutes> to read the state from the KNX bus when no telegram was received for <minutes>
  • <minutes> equivalent to “expire <minutes>”
  • init to just initialize the state on startup
device_class string (Optional)

Sets the class of the device, changing the device state and icon that is displayed on the frontend.

reset_after float (Optional)

Reset back to “off” state after specified time in seconds.

invert boolean (Optional, default: false)

Invert the telegrams payload before processing. This is applied before context_timeout or reset_after is evaluated.

ignore_internal_state boolean (Optional, default: false)

Specifies if telegrams should ignore the internal state and always trigger a Home Assistant state update.

context_timeout float (Optional, default: None)

The time in seconds between multiple identical telegram payloads would count towards an internal counter that can be used for automations. This setting defines the time window that a second telegram would count toward a single state change. So if you set this 3.0 you can take up to 3 seconds in order to trigger the second button press, and a single press would take 3 seconds to trigger a Home Assistant state update. If this is set, ignore_internal_state will be set to true internally. Maximum value is 10.0.

entity_category string (Optional, default: None)

The category of the entity.

Automation example 

Let’s pretend you have configured a binary sensor with the name Livingroom Switch and you want to toggle a light when the button was pressed once and another light when the button was pressed twice. context_timeout has to be configured in order for this to work and the switch would have to send the same payloads on each press (on – on within the time window).

automation:
  - triggers:
      - trigger: numeric_state
        entity_id: binary_sensor.livingroom_switch
        attribute: counter
        above: 0
        below: 2
    actions:
      - action: light.toggle
        entity_id: light.livingroom_ceiling_lamp
  - triggers:
      - trigger: numeric_state
        entity_id: binary_sensor.livingroom_switch
        attribute: counter
        above: 1
        below: 3
    actions:
      - action: light.toggle
        target:
          entity_id:
            - light.livingroom_floor_lamp
YAML
 

Button 

The KNX button platform allows to send concurrent predefined values via the frontend or an action. When a user presses the button, the assigned generic raw payload is sent to the KNX bus.

 Tip

Telegrams received on the KNX bus for the group address of a button are not reflected in a new button state. Use the knx.telegram trigger if you want to automate on a specific payload received on a group address.

# Example configuration.yaml entry
knx:
  button:
    - name: "DPT 1 - True button"
      address: "0/0/1"
    - name: "100% button"
      address: "0/0/2"
      payload: 0xFF
      payload_length: 1
    - name: "Temperature button"
      address: "0/0/3"
      value: 21.5
      type: temperature
YAML
 

 Important

When type is used value is required, payload is invalid. When payload_length is used value is invalid.

Configuration Variables 

name string (Optional)

A name for this device used within Home Assistant.

address string Required

Group address to send to.

payload integer (Optional, default: 1)

The raw payload that shall be sent.

payload_length integer (Optional, default: 0)

The length of the payload data in the telegram. Use 0 for DPT 1, 2 or 3.

value integer | float | string (Optional)

The value that shall be sent encoded by type.

type string | integer (Optional)

A type from the value types table to encode the configured value.

entity_category string (Optional, default: None)

The category of the entity.

Climate 

The KNX climate platform is used as an interface to KNX thermostats and room controllers.

To use your KNX thermostats in your installation, add the following lines to your top level KNX Integration configuration key in configuration.yaml:

# Example configuration.yaml entry
knx:
  climate:
    - name: "Kitchen"
      temperature_address: "5/1/1"
      setpoint_shift_address: "5/1/2"
      setpoint_shift_state_address: "5/1/3"
      target_temperature_state_address: "5/1/4"
      operation_mode_address: "5/1/5"
      operation_mode_state_address: "5/1/6"
YAML
 

Alternatively, if your device has dedicated binary group addresses for frost/night/comfort mode:

# Example configuration.yaml entry
knx:
  climate:
    - name: "Kitchen"
      temperature_address: "5/1/1"
      setpoint_shift_address: "5/1/2"
      setpoint_shift_state_address: "5/1/3"
      target_temperature_state_address: "5/1/4"
      operation_mode_frost_protection_address: "5/1/5"
      operation_mode_night_address: "5/1/6"
      operation_mode_comfort_address: "5/1/7"
      operation_mode_state_address: "5/1/8"
YAML
 

If your device doesn’t support setpoint_shift calculations (i.e., if you don’t provide a setpoint_shift_address value) please set the min_temp and max_temp attributes of the climate device to avoid issues with exceeding valid temperature values in the frontend. Please do also make sure to add the target_temperature_address to the configuration in this case.:

# Example configuration.yaml entry
knx:
  climate:
    - name: "Kitchen"
      temperature_address: "5/1/2"
      target_temperature_address: "5/1/4"
      target_temperature_state_address: "5/1/1"
      operation_mode_frost_protection_address: "5/1/5"
      operation_mode_night_address: "5/1/6"
      operation_mode_comfort_address: "5/1/7"
      operation_mode_state_address: "5/1/8"
      operation_mode_standby_address: "5/1/9"
      min_temp: 7.0
      max_temp: 32.0
YAML
 

setpoint_shift_mode allows the two following DPTs to be used:

  • DPT6010 (for 1 byte signed integer with scale factor)
  • DPT9002 (for 2 byte float)

Example:

# Example configuration.yaml entry
knx:
  climate:
    - name: "Kitchen"
      temperature_address: "5/1/1"
      setpoint_shift_address: "5/1/2"
      setpoint_shift_state_address: "5/1/3"
      setpoint_shift_mode: "DPT9002"
      target_temperature_state_address: "5/1/4"
      operation_mode_address: "5/1/5"
      operation_mode_state_address: "5/1/6"
YAML
 

operation_mode_frost_protection_address / operation_mode_night_address / operation_mode_comfort_address / operation_mode_standby_address are not necessary if operation_mode_address is specified.

The following values are valid for the heat_cool_address and the heat_cool_state_address:

  • 0 (cooling)
  • 1 (heating)

Supported HVAC modes for your KNX thermostats are found automatically. This can be overridden by using the controller_modes configuration variable. The following values are valid controller modes:

  • off
  • auto
  • heat
  • cool
  • fan_only
  • dehumidification

Supported preset modes for your KNX thermostats are found automatically. This can be overridden by using the operation_modes configuration variable. The following values are valid operation modes:

  • auto
  • comfort
  • standby
  • economy
  • building_protection

Configuration Variables 

name string (Optional, default: KNX Climate)

A name for this device used within Home Assistant.

temperature_address string | list Required

KNX group address for reading current room temperature from KNX bus. DPT 9.001

temperature_step float (Optional, default: 0.1)

Defines the step size in Kelvin for each step of setpoint_shift (scale factor). For non setpoint-shift configurations this is used to set the step of temperature sliders in UI.

target_temperature_address string | list (Optional)

KNX group address for setting target temperature. DPT 9.001

target_temperature_state_address string | list Required

KNX group address for reading current target temperature from KNX bus. DPT 9.001

setpoint_shift_address string | list (Optional)

KNX address for setpoint_shift. DPT 6.010 or DPT 9.002 based on setpoint_shift_mode

setpoint_shift_state_address string | list (Optional)

KNX address for reading setpoint_shift. DPT 6.010 or DPT 9.002 based on setpoint_shift_mode

setpoint_shift_mode string (Optional, default: None)

Defines the internal device DPT used. Either ‘DPT6010’, ‘DPT9002’ or None. When None or omitted the DPT is auto-assigned from the first incoming telegram.

setpoint_shift_min float (Optional, default: -6)

Minimum value of setpoint shift.

setpoint_shift_max float (Optional, default: 6)

Maximum value of setpoint shift.

active_state_address string | list (Optional)

KNX address for reading current activity. 0 is idle, 1 is active. DPT 1

command_value_state_address string | list (Optional)

KNX address for reading current command value in percent. 0 sets the climate entity to idle if active_state_address is not set. DPT 5.001

humidity_state_address string | list (Optional)

KNX address for reading current humidity. DPT 9.007

operation_mode_address string | list (Optional)

KNX address for setting operation mode (auto / building protection / economy / standby / comfort). DPT 20.102

operation_mode_state_address string | list (Optional)

KNX address for reading operation mode. DPT 20.102

controller_status_address string | list (Optional)

KNX address for HVAC controller status (in accordance with KNX AN 097/07 rev 3).

controller_status_state_address string | list (Optional)

KNX address for reading HVAC controller status.

controller_mode_address string | list (Optional)

KNX address for setting HVAC controller modes. DPT 20.105

controller_mode_state_address string | list (Optional)

KNX address for reading HVAC control mode. DPT 20.105

heat_cool_address string | list (Optional)

KNX address for switching between heat/cool mode. DPT 1.100

heat_cool_state_address string | list (Optional)

KNX address for reading heat/cool mode. DPT 1.100

operation_mode_frost_protection_address string | list (Optional)

KNX address for switching on/off frost/heat protection mode. DPT 1

operation_mode_night_address string | list (Optional)

KNX address for switching on/off economy mode. DPT 1

operation_mode_comfort_address string | list (Optional)

KNX address for switching on/off comfort mode. DPT 1

operation_mode_standby_address string | list (Optional)

KNX address for switching on/off standby mode. DPT 1

operation_modes list (Optional)

Overrides the supported operation modes. Provide the supported preset_modes value for your device.

controller_modes list (Optional)

Overrides the supported controller modes. Provide the supported hvac_modes value for your device.

default_controller_mode string (Optional, default: heat)

Overrides the default controller mode. Any Home Assistant hvac_mode can be configured. This can, for example, be set to “cool” for cooling-only devices.

on_off_address string | list (Optional)

KNX address for switching the climate device on/off. DPT 1

on_off_invert boolean (Optional, default: false)

Value for switching the climate device on/off is inverted.

on_off_state_address string | list (Optional)

KNX address for gathering the current state (on/off) of the climate device. DPT 1

min_temp float (Optional)

Override the minimum temperature.

max_temp float (Optional)

Override the maximum temperature.

fan_speed_address string | list (Optional)

KNX group address for setting the percentage or step of the fan. DPT 5.001 or DPT 5.010

fan_speed_state_address string | list (Optional)

KNX group address for retrieving the percentage or step of the fan. DPT 5.001 or DPT 5.010

fan_max_step integer (Optional, default: 3)

The maximum amount of steps for the fan.

fan_speed_mode string (Optional, default: percent)

Fan speed group address data type. percent for DPT 5.001 and step for DPT 5.010.

fan_zero_mode string (Optional, default: off)

The fan mode for the zero speed, either off or auto. This affects the fan modes displayed in the UI.

swing_address string | list (Optional)

KNX address for turning the (vertical) swing on/off. DPT 1

swing_state_address string | list (Optional)

KNX address for gathering the current state (on/off) of the (vertical) swing. DPT 1

swing_horizontal_address string | list (Optional)

KNX address for turning the horizontal swing on/off. DPT 1

swing_horizontal_state_address string | list (Optional)

KNX address for gathering the current state (on/off) of the horizontal swing. DPT 1

entity_category string (Optional, default: None)

The category of the entity.

Cover 

The KNX cover platform is used as an interface to KNX covers.

 Note

Unlike most KNX devices, Home Assistant defines 0% as closed and 100% as fully open in regards to covers. The corresponding value inversion is done internally by the KNX integration.

Home Assistant will, by default, close a cover by moving it in the DOWN direction in the KNX nomenclature, and open a cover by moving it in the UP direction.

Cover entities can be created from the frontend in the KNX panel or via YAML.

Configuration of KNX cover entities via YAML
 

To use your KNX covers in your installation, add the following lines to your top level KNX Integration configuration key in your configuration.yaml:

# Example configuration.yaml entry
knx:
  cover:
    - name: "Kitchen shutter"
      move_long_address: "3/0/0"
      stop_address: "3/0/4"
      position_address: "3/0/3"
      position_state_address: "3/0/2"
      travelling_time_down: 51
      travelling_time_up: 61
    - name: "Bedroom blinds"
      move_long_address: "3/1/1"
      move_short_address: "3/1/4"
      position_address: "3/1/3"
      position_state_address: "3/1/2"
      angle_address: "3/1/5"
      angle_state_address: "3/1/6"
      travelling_time_down: 40
      travelling_time_up: 40
YAML
 

Configuration Variables 

name string (Optional, default: KNX Cover)

A name for this device used within Home Assistant.

move_long_address string | list (Optional)

KNX group address for moving the cover full up or down. DPT 1

move_short_address string | list (Optional)

KNX group address for moving the cover stepwise up or down. Used by some covers also as the means to stop the cover. Stepwise moves are only mapped to tilt angle functions in Home Assistant, as no stepwise move of cover position is generally supported by the architecture. If tilt angle is not supported, prefer the use of a stop_addressDPT 1

stop_address string | list (Optional)

KNX group address for stopping the current movement of the cover. DPT 1

position_address string | list (Optional)

KNX group address for moving the cover to the dedicated position. DPT 5.001

position_state_address string | list (Optional)

Separate KNX group address for requesting the current position of the cover. DPT 5.001

angle_address string | list (Optional)

KNX group address for tilting the cover to the dedicated angle. DPT 5.001

angle_state_address string | list (Optional)

Separate KNX group address for requesting the current tilt angle of the cover. DPT 5.001

travelling_time_down integer (Optional, default: 25)

Time cover needs to travel down in seconds. Needed to calculate the intermediate positions of cover while traveling.

travelling_time_up integer (Optional, default: 25)

Time cover needs to travel up in seconds. Needed to calculate the intermediate positions of cover while traveling.

invert_updown boolean (Optional, default: false)

Set this to true to invert the up/down commands from/to your KNX actuator. Default is to consider UP (0) as opening of a cover and DOWN (1) as closing of a cover.

invert_position boolean (Optional, default: false)

Set this to true if your actuator reports fully down position as 0% in KNX.

invert_angle boolean (Optional, default: false)

Set this to true if your actuator reports fully closed tilt as 0% in KNX.

device_class string (Optional)

Sets the class of the device, changing the device state and icon that is displayed on the frontend.

entity_category string (Optional, default: None)

The category of the entity.

Date 

The KNX date platform allows to send date values to the KNX bus and update its state from received telegrams. It can optionally respond to read requests from the KNX bus.

 Note

Date entities without a state_address will restore their last known state after Home Assistant was restarted.

Dates that have a state_address configured request their current state from the KNX bus.

 Note

DPT 11.001 covers the range 1990 to 2089. Year values outside of this range are not allowed.

# Example configuration.yaml entry
knx:
  date:
    - name: "Date"
      address: "0/0/2"
      state_address: "0/0/2"
YAML
 

Configuration Variables 

name string (Optional)

A name for this device used within Home Assistant.

address string | list Required

The group address to which new values will be sent. DPT 11.001

state_address string | list (Optional)

Group address for retrieving the state from the KNX bus. DPT 11.001

respond_to_read boolean (Optional, default: false)

If true, the entity will respond to GroupValueRead telegrams received on the configured address by sending a GroupValueResponse to the same address. This is typically used when Home Assistant acts as the state provider for the KNX bus. In such cases, only address is configured, and state_address is not set. Read-requests to passive or state addresses don’t trigger responses.

sync_state boolean | string | integer (Optional, default: true)

Actively read the value from the bus. The maximum time interval (<minutes>) is 1440. The following values are valid

  • true equivalent to “expire 60” (default)
  • false no GroupValueRead telegrams will be sent to the bus
  • every <minutes> to update it regularly every <minutes>
  • expire <minutes> to read the state from the KNX bus when no telegram was received for <minutes>
  • <minutes> equivalent to “expire <minutes>”
  • init to just initialize the state on startup
entity_category string (Optional, default: None)

The category of the entity.

DateTime 

The KNX datetime platform allows to send datetime values to the KNX bus and update its state from received telegrams. It can optionally respond to read requests from the KNX bus.

 Note

Date entities without a state_address will restore their last known state after Home Assistant was restarted.

DateTimes that have a state_address configured request their current state from the KNX bus.

 Note

System timezone is used as DPT 19.001 doesn’t provide timezone information. Year values outside of the range 1900 to 2155 are invalid.

# Example configuration.yaml entry
knx:
  datetime:
    - name: "DateTime"
      address: "0/0/3"
      state_address: "0/0/4"
YAML
 

Configuration Variables 

name string (Optional)

A name for this device used within Home Assistant.

address string | list Required

The group address to which new values will be sent. DPT 19.001

state_address string | list (Optional)

Group address for retrieving the state from the KNX bus. DPT 19.001

respond_to_read boolean (Optional, default: false)

If true, the entity will respond to GroupValueRead telegrams received on the configured address by sending a GroupValueResponse to the same address. This is typically used when Home Assistant acts as the state provider for the KNX bus. In such cases, only address is configured, and state_address is not set. Read-requests to passive or state addresses don’t trigger responses.

sync_state boolean | string | integer (Optional, default: true)

Actively read the value from the bus. The maximum time interval (<minutes>) is 1440. The following values are valid

  • true equivalent to “expire 60” (default)
  • false no GroupValueRead telegrams will be sent to the bus
  • every <minutes> to update it regularly every <minutes>
  • expire <minutes> to read the state from the KNX bus when no telegram was received for <minutes>
  • <minutes> equivalent to “expire <minutes>”
  • init to just initialize the state on startup
entity_category string (Optional, default: None)

The category of the entity.

Fan 

The KNX fan integration is used to control KNX fans. Following control types are supported:

  • Percentage controlled: Fans that set the percentage directly from 0-100%.
  • Step controlled: Fans which have a fixed amount of steps to set. The integration will convert percentage to step automatically. The max_step attribute is set to the number of steps of the fan, not counting the off-step. Example: A fan supports the steps 0 to 3. To use this fan the max_step attribute has to be set to 3. The integration will convert the percentage 66 % to the step 2 when sending data to KNX.

To use your KNX fan in your installation, add the following lines to your top-level KNX Integration configuration key in your configuration.yaml:

# Example configuration.yaml entry
knx:
  fan:
    - name: "Ceiling fan"
      address: "9/0/1"
      state_address: "9/0/2"
YAML
 

Configuration Variables 

name string (Optional)

A name for this device used within Home Assistant.

address string | list Required

KNX group address for setting the percentage or step of the fan. DPT 5.001 or DPT 5.010

state_address string | list (Optional)

KNX group address for retrieving the percentage or step of the fan. DPT 5.001 or DPT 5.010

oscillation_address string | list (Optional)

KNX group address for switching the fan oscillation on or off. DPT 1

oscillation_state_address string | list (Optional)

KNX group address for retrieving the state of the fan oscillation. DPT 1

max_step integer (Optional)

The maximum amount of steps for a step-controlled fan. If set, the integration will convert percentages to steps automatically.

entity_category string (Optional, default: None)

The category of the entity.

Light 

The KNX light integration is used as an interface to control KNX actuators for lighting applications such as:

  • Switching actuators
  • Dimming actuators
  • LED controllers
  • DALI gateways

Light entities can be created from the frontend in the KNX panel or via YAML.

Configuration of KNX light entities via YAML
 

Configuration Variables 

address string | list Required

KNX group address for switching the light on and off. DPT 1.001

state_address string | list (Optional)

KNX group address for retrieving the switch state of the light. DPT 1.001

name string (Optional)

A name for this device used within Home Assistant.

brightness_address string | list (Optional)

KNX group address for setting the brightness of the light in percent (absolute dimming). DPT 5.001

brightness_state_address string | list (Optional)

KNX group address for retrieving the brightness of the light in percent. DPT 5.001

color_address string | list (Optional)

KNX group address for setting the RGB color of the light. DPT 232.600

color_state_address string | list (Optional)

KNX group address for retrieving the RGB color of the light. DPT 232.600

rgbw_address string | list (Optional)

KNX group address for setting the RGBW color of the light. DPT 251.600

rgbw_state_address string | list (Optional)

KNX group address for retrieving the RGBW color of the light. DPT 251.600

hue_address string | list (Optional)

KNX group address for setting the hue of the light color in degrees. DPT 5.003

hue_state_address string | list (Optional)

KNX group address for retrieving the hue of the light color in degrees. DPT 5.003

saturation_address string | list (Optional)

KNX group address for setting the saturation of the light color in percent. DPT 5.001

saturation_state_address string | list (Optional)

KNX group address for retrieving the saturation of the light color in percent. DPT 5.001

xyy_address string | list (Optional)

KNX group address for setting the xyY color of the light. DPT 242.600

xyy_state_address string | list (Optional)

KNX group address for retrieving the xyY color of the light. DPT 242.600

individual_colors map (Optional)

Used when the actuator only supports individual group addresses for colors. When individual_colors is used the root address key may be omitted.

red map Required

Group addresses for the red component.

address string | list (Optional)

KNX group address to switch the red component. DPT 1.001

state_address string | list (Optional)

KNX group address for the state of the red component. DPT 1.001

brightness_address string | list Required

KNX group address to set the brightness of the red component. DPT 5.001

brightness_state_address string | list (Optional)

KNX group address for the current brightness of the red component. DPT 5.001

green map Required

Group addresses for the green component. Same keys available as for red component above.

blue map Required

Group addresses for the blue component. Same keys available as for red component above.

white map (Optional)

Group addresses for the white component. Same keys available as for red component above.

color_temperature_address string | list (Optional)

KNX group address for setting the color temperature of the light. DPT 5.001, 7.600 or 9 based on color_temperature_mode

color_temperature_state_address string | list (Optional)

KNX group address for retrieving the color temperature of the light. DPT 5.001, 7.600 or 9 based on color_temperature_mode

color_temperature_mode string (Optional, default: absolute)

Color temperature group address data type. absolute for color temperature in Kelvin (2 byte unsigned integer). color_temperature_address -> DPT 7.600absolute_float for color temperature represented in 2 byte float. color_temperature_address -> DPT 9relative color temperature in percent cold white (0% warmest; 100% coldest). color_temperature_address -> DPT 5.001

min_kelvin integer (Optional, default: 2700)

Warmest possible color temperature in Kelvin. Used in combination with color_temperature_address.

max_kelvin integer (Optional, default: 6000)

Coldest possible color temperature in Kelvin. Used in combination with color_temperature_address.

entity_category string (Optional, default: None)

The category of the entity.

Many KNX devices can change their state internally without a message to the switch address on the KNX bus, e.g., if you configure a scene or a timer on a channel. The optional state_address can be used to inform Home Assistant about these state changes. If a KNX message is seen on the bus addressed to the given state_address (in most cases from the light actuator), it will overwrite the state of the object.

For switching/light actuators that are only controlled by a single group address and don’t have dedicated state group objects you can set state_address to the same value as address if it is readable from the bus.

YAML configuration examples 

knx:
  light:
    # dimmable light
    # color mode: brightness
    - name: "Dimmable light"
      address: "1/0/9"
      state_address: "1/1/9"
      brightness_address: "1/2/9"
      brightness_state_address: "1/3/9"
    # XYY light
    # color mode: xy
    - name: "XYY light"
      address: "1/0/9"
      state_address: "1/1/9"
      brightness_address: "1/2/9"  # optional - if not set brightness will be sent over the xyy data point
      brightness_state_address: "1/3/9"
      xyy_address: "1/4/9"
      xyy_state_address: "1/5/9"
    # HS light
    # color mode: hs
    - name: "HS light"
      address: "1/0/9"
      state_address: "1/1/9"
      brightness_address: "1/2/9"  # required for HS
      brightness_state_address: "1/3/9"
      hue_address: "1/4/8"
      hue_state_address: "1/5/8"  # required for HS
      saturation_address: "1/4/9"
      saturation_state_address: "1/5/9"  # required for HS
    # RGB light
    # color mode: rgb
    - name: "RGB light"
      address: "1/0/9"
      state_address: "1/1/9"
      brightness_address: "1/2/9"  # optional for RGB lights
      brightness_state_address: "1/3/9"
      color_address: "1/4/9"
      color_state_address: "1/5/9"
    # RGBW light
    # color mode: rgbw
    - name: "RGBW light"
      address: "0/4/83"
      state_address: "0/4/84"
      brightness_address: "0/4/85"  # optional for RGBW lights
      brightness_state_address: "0/4/86"
      rgbw_address: "0/4/87"
      rgbw_state_address: "0/4/88"
    # RGB(W) individual object light
    # color mode: rgb / rgbw
    - name: "RGBW individual light"
      address: "1/0/9"  # optional for individual color lights
      individual_colors:
        red:
          brightness_address: "0/4/61"
          brightness_state_address: "0/5/61"
        green:
          brightness_address: "0/4/62"
          brightness_state_address: "0/5/62"
        blue:
          brightness_address: "0/4/63"
          brightness_state_address: "0/5/63"
        white:
          brightness_address: "0/4/64"
          brightness_state_address: "0/5/64"
    # tunable white light
    # color mode: color_temp
    - name: "TW light"
      address: "1/0/21"
      state_address: "1/1/21"
      brightness_address: "1/2/21"
      brightness_state_address: "1/3/21"
      color_temperature_address: "1/4/21"
      color_temperature_state_address: "1/5/21"
      color_temperature_mode: absolute
      min_kelvin: 2550
      max_kelvin: 6200
    # actuator without dedicated state group object
    # color mode: onoff
    - name: "Simple light"
      address: "1/0/5"
      state_address: "1/0/5"
YAML
 

Notify 

The KNX notify platform allows you to send notifications to KNX devices as DPT16 strings.

knx:
  notify:
    - name: "Alarm"
      address: "5/1/10"
YAML
 

Configuration Variables 

address string | list Required

KNX group address the notification will be sent to. DPT 16

name string (Optional)

A name for this device used within Home Assistant.

type string (Optional, default: latin_1)

A DPT identifier representing a text value (“string” or “latin_1” – see KNX Sensor) used to encode the notification.

entity_category string (Optional, default: None)

The category of the entity.

Example action 

action: notify.send_message
data:
  message: "Hello from HA!"
  entity_id: notify.alarm
YAML
 

Number 

The KNX number platform allows to send generic numeric values to the KNX bus and update its state from received telegrams. It can optionally respond to read requests from the KNX bus.

 Note

Number entities without a state_address will restore their last known state after Home Assistant was restarted.

Numbers that have a state_address configured request their current state from the KNX bus.

# Example configuration.yaml entry
knx:
  number:
    - name: "Duration"
      address: "0/0/1"
      type: time_period_sec
    - name: "Volume"
      address: "0/0/2"
      state_address: "0/0/3"
      type: percent
    - name: "Temperature threshold"
      address: "0/0/4"
      respond_to_read: true
      type: temperature
      min: 20
      max: 24.5
      step: 0.1
      mode: slider
YAML
 

Configuration Variables 

name string (Optional)

A name for this device used within Home Assistant.

address string | list Required

The group address to which new values will be sent.

state_address string | list (Optional)

Group address for retrieving the state from the KNX bus.

type string | integer Required

Any supported type of KNX Sensor representing a numeric value (e.g., “percent” or “temperature”).

respond_to_read boolean (Optional, default: false)

If true, the entity will respond to GroupValueRead telegrams received on the configured address by sending a GroupValueResponse to the same address. This is typically used when Home Assistant acts as the state provider for the KNX bus. In such cases, only address is configured, and state_address is not set. Read-requests to passive or state addresses don’t trigger responses.

min float (Optional)

Minimum value that can be sent. Defaults to the type DPT minimum value.

max float (Optional)

Maximum value that can be sent. Defaults to the type DPT maximum value.

step float (Optional)

Step value. Defaults to the step size defined for the DPT in the KNX specifications.

mode string (Optional, default: auto)

Specifies the mode used in the UI. autobox or slider are valid.

entity_category string (Optional, default: None)

The category of the entity.

Scene 

The KNX scene platform allows you to activate KNX scenes and updates scene entities when the corresponding scene number is received on the KNX bus.

# Example configuration.yaml entry
knx:
  scene:
    - name: "Romantic"
      address: 8/8/8
      scene_number: 23
YAML
 

Configuration Variables 

address string | list Required

KNX group address for the scene. DPT 17.001

scene_number integer Required

KNX scene number to be activated (range 1..64 ).

name string (Optional)

A name for this device used within Home Assistant.

entity_category string (Optional, default: None)

The category of the entity.

Select 

The KNX select platform allows the user to define a list of values that can be selected via the frontend and can be used within conditions of automation. When a user selects a new item, the assigned generic raw payload is sent to the KNX bus. A received telegram updates the state of the select entity. It can optionally respond to read requests from the KNX bus.

 Note

Select entities without a state_address will restore their last known state after Home Assistant was restarted.

Selects that have a state_address configured request their current state from the KNX bus.

# Example configuration.yaml entry
knx:
  select:
    - name: "DPT 2 selector"
      address: "0/0/1"
      payload_length: 0
      options:
        - option: "No control"
          payload: 0
        - option: "Control On"
          payload: 0b10
        - option: "Control Off"
          payload: 0b11
    - name: "DHWMode"
      address: "0/0/2"
      state_address: "0/0/3"
      payload_length: 1
      options:
        - option: "Auto"
          payload: 0
        - option: "LegioProtect"
          payload: 1
        - option: "Normal"
          payload: 2
        - option: "Reduced"
          payload: 3
        - option: "Off/FrostProtect"
          payload: 4
YAML
 

Configuration Variables 

name string (Optional)

A name for this device used within Home Assistant.

address string | list Required

The group address to which new values will be sent.

state_address string | list (Optional)

Group address for retrieving the state from the KNX bus.

payload_length integer Required

The length of the payload expected for the DPT. Use 0 for DPT 1, 2 or 3.

options list Required

List of options to choose from. Each option and payload have to be unique.

option string Required

The name of the option used to trigger the assigned payload.

payload integer Required

The raw payload assigned to the option.

respond_to_read boolean (Optional, default: false)

If true, the entity will respond to GroupValueRead telegrams received on the configured address by sending a GroupValueResponse to the same address. This is typically used when Home Assistant acts as the state provider for the KNX bus. In such cases, only address is configured, and state_address is not set. Read-requests to passive or state addresses don’t trigger responses.

sync_state boolean | string | integer (Optional, default: true)

Actively read the value from the bus. The maximum time interval (<minutes>) is 1440. The following values are valid

  • true equivalent to “expire 60” (default)
  • false no GroupValueRead telegrams will be sent to the bus
  • every <minutes> to update it regularly every <minutes>
  • expire <minutes> to read the state from the KNX bus when no telegram was received for <minutes>
  • <minutes> equivalent to “expire <minutes>”
  • init to just initialize the state on startup
entity_category string (Optional, default: None)

The category of the entity.

Sensor 

The KNX sensor platform allows you to monitor KNX sensors.

 Note

Sensors are read-only entities. To write to the KNX bus, configure a KNX Number entity or use the knx.send action.

# Example configuration.yaml entry
knx:
  sensor:
    - name: "Heating Valve 1"
      state_address: "2/0/0"
      type: percent
YAML
 

In order to actively read the sensor data from the bus every 30 minutes you can add the following lines to your configuration.yaml:

# Example configuration.yaml entry
knx:
  sensor:
    - name: "Heating Valve 1"
      state_address: "2/0/0"
      type: percent
      sync_state: every 30
YAML
 

Configuration Variables 

state_address string | list Required

KNX group address of the sensor.

type string | integer Required

A type from the value types table below must be defined. The DPT of the group address should match the expected KNX DPT to be parsed correctly.

name string (Optional)

A name for this device used within Home Assistant.

sync_state boolean | string | integer (Optional, default: true)

Actively read the value from the bus. The maximum time interval (<minutes>) is 1440. The following values are valid

  • true equivalent to “expire 60” (default)
  • false no GroupValueRead telegrams will be sent to the bus
  • every <minutes> to update it regularly every <minutes>
  • expire <minutes> to read the state from the KNX bus when no telegram was received for <minutes>
  • <minutes> equivalent to “expire <minutes>”
  • init to just initialize the state on startup
always_callback boolean (Optional, default: false)

Defines if telegrams with equal payload as the previously received telegram should trigger a state update within Home Assistant.

state_class string (Optional)

Sets the state_class of the sensor.

entity_category string (Optional, default: None)

The category of the entity.

device_class string (Optional)

Overrides the class of the device, changing the device state and icon that is displayed on the frontend.

Value types 

KNX DPTtypesize in byterangeunit
51byte_unsigned10 … 255 
5.001percent10 … 100%
5.003angle10 … 360°
5.004percentU810 … 255%
5.005decimal_factor10 … 255 
5.006tariff10 … 254 
5.010pulse10 … 255counter pulses
61byte_signed1-128 … 127 
6.001percentV81-128 … 127%
6.010counter_pulses1-128 … 127counter pulses
72byte_unsigned20 … 65535 
7.001pulse_2byte20 … 65535pulses
7.002time_period_msec20 … 65535ms
7.003time_period_10msec20 … 65535ms
7.004time_period_100msec20 … 65535ms
7.005time_period_sec20 … 65535s
7.006time_period_min20 … 65535min
7.007time_period_hrs20 … 65535h
7.011length_mm20 … 65535mm
7.012current20 … 65535mA
7.013brightness20 … 65535lx
7.600color_temperature20 … 65535K
82byte_signed2-32768 … 32767 
8.001pulse_2byte_signed2-32768 … 32767pulses
8.002delta_time_ms2-32768 … 32767ms
8.003delta_time_10ms2-32768 … 32767ms
8.004delta_time_100ms2-32768 … 32767ms
8.005delta_time_sec2-32768 … 32767s
8.006delta_time_min2-32768 … 32767min
8.007delta_time_hrs2-32768 … 32767h
8.010percentV162-32768 … 32767%
8.011rotation_angle2-32768 … 32767°
8.012length_m2-32768 … 32767m
92byte_float2-671088.64 … 670760.96 
9.001temperature2-273 … 670760°C
9.002temperature_difference_2byte2-670760 … 670760K
9.003temperature_a2-670760 … 670760K/h
9.004illuminance20 … 670760lx
9.005wind_speed_ms20 … 670760m/s
9.006pressure_2byte20 … 670760Pa
9.007humidity20 … 670760%
9.008ppm2-671088.64 … 670760.96ppm
9.009air_flow2-671088.64 … 670760.96m³/h
9.010time_12-670760 … 670760s
9.011time_22-670760 … 670760ms
9.020voltage2-671088.64 … 670760.96mV
9.021curr2-671088.64 … 670760.96mA
9.022power_density2-671088.64 … 670760.96W/m²
9.023kelvin_per_percent2-671088.64 … 670760.96K/%
9.024power_2byte2-671088.64 … 670760.96kW
9.025volume_flow2-671088.64 … 670760.96l/h
9.026rain_amount2-671088.64 … 670760.96l/m²
9.027temperature_f2-459.6 … 670760°F
9.028wind_speed_kmh20 … 670760km/h
9.029absolute_humidity20 … 670760g/m³
9.030concentration_ugm320 … 670760μg/m³
9.?enthalpy2-671088.64 … 670760.96H
124byte_unsigned40 … 4294967295 
12.001pulse_4_ucount40 … 4294967295counter pulses
12.100long_time_period_sec40 … 4294967295s
12.101long_time_period_min40 … 4294967295min
12.102long_time_period_hrs40 … 4294967295h
12.1200volume_liquid_litre40 … 4294967295l
12.1201volume_m340 … 4294967295
134byte_signed4-2147483648 … 2147483647 
13.001pulse_4byte4-2147483648 … 2147483647counter pulses
13.002flow_rate_m3h4-2147483648 … 2147483647m³/h
13.010active_energy4-2147483648 … 2147483647Wh
13.011apparant_energy4-2147483648 … 2147483647VAh
13.012reactive_energy4-2147483648 … 2147483647VARh
13.013active_energy_kwh4-2147483648 … 2147483647kWh
13.014apparant_energy_kvah4-2147483648 … 2147483647kVAh
13.015reactive_energy_kvarh4-2147483648 … 2147483647kVARh
13.016active_energy_mwh4-2147483648 … 2147483647MWh
13.100long_delta_timesec4-2147483648 … 2147483647s
144byte_float4  
14.000acceleration4 m/s²
14.001acceleration_angular4 rad/s²
14.002activation_energy4 J/mol
14.003activity4 s⁻¹
14.004mol4 mol
14.005amplitude4  
14.006angle_rad4 rad
14.007angle_deg4 °
14.008angular_momentum4 J s
14.009angular_velocity4 rad/s
14.010area4 
14.011capacitance4 F
14.012charge_density_surface4 C/m²
14.013charge_density_volume4 C/m³
14.014compressibility4 m²/N
14.015conductance4 S
14.016electrical_conductivity4 S/m
14.017density4 kg/m³
14.018electric_charge4 C
14.019electric_current4 A
14.020electric_current_density4 A/m²
14.021electric_dipole_moment4 C m
14.022electric_displacement4 C/m²
14.023electric_field_strength4 V/m
14.024electric_flux4 c
14.025electric_flux_density4 C/m²
14.026electric_polarization4 C/m²
14.027electric_potential4 V
14.028electric_potential_difference4 V
14.029electromagnetic_moment4 A m²
14.030electromotive_force4 V
14.031energy4 J
14.032force4 N
14.033frequency4 Hz
14.034angular_frequency4 rad/s
14.035heatcapacity4 J/K
14.036heatflowrate4 W
14.037heat_quantity4 J
14.038impedance4 Ω
14.039length4 m
14.040light_quantity4 lm s
14.041luminance4 cd/m²
14.042luminous_flux4 lm
14.043luminous_intensity4 cd
14.044magnetic_field_strength4 A/m
14.045magnetic_flux4 Wb
14.046magnetic_flux_density4 T
14.047magnetic_moment4 A m²
14.048magnetic_polarization4 T
14.049magnetization4 A/m
14.050magnetomotive_force4 A
14.051mass4 kg
14.052mass_flux4 kg/s
14.053momentum4 N/s
14.054phaseanglerad4 rad
14.055phaseangledeg4 °
14.056power4 W
14.057powerfactor4  
14.058pressure4 Pa
14.059reactance4 Ω
14.060resistance4 Ω
14.061resistivity4 Ωm
14.062self_inductance4 H
14.063solid_angle4 sr
14.064sound_intensity4 W/m²
14.065speed4 m/s
14.066stress4 Pa
14.067surface_tension4 N/m
14.068common_temperature4 °C
14.069absolute_temperature4 K
14.070temperature_difference4 K
14.071thermal_capacity4 J/K
14.072thermal_conductivity4 W/mK
14.073thermoelectric_power4 V/K
14.074time_seconds4 s
14.075torque4 Nm
14.076volume4 
14.077volume_flux4 m³/s
14.078weight4 N
14.079work4 J
14.080apparent_power4 VA
16.000string14ASCII 
16.001latin_114ISO 8859-1 / Latin-1 
17.001scene_number11 … 64 
298byte_signed8±9223372036854775807 
29.010active_energy_8byte8±9223372036854775807Wh
29.011apparant_energy_8byte8±9223372036854775807VAh
29.012reactive_energy_8byte8±9223372036854775807VARh

More examples 

# Example configuration.yaml entry
knx:
  sensor:
    - name: "Heating Valve 1"
      state_address: "2/0/0"
      sync_state: init
      type: percent
    - name: "Kitchen Temperature"
      state_address: "6/2/1"
      sync_state: every 60
      type: temperature
      state_class: measurement
YAML
 

Switch 

The KNX switch platform is used as an interface to switching actuators.

Switch entities can be created from the frontend in the KNX panel or via YAML.

Switch entities without a state_address will restore their last known state after Home Assistant was restarted. Switches that have a state_address configured request their current state from the KNX bus.

Configuration of KNX switch entities via YAML
 
knx:
  switch:
    - name: "Kitchen coffee maker"
      address: "1/1/6"
YAML
 

Configuration Variables 

address string | list Required

KNX group address for switching the switch on/off. DPT 1

name string (Optional, default: KNX Switch)

A name for this device used within Home Assistant.

state_address string | list (Optional)

Separate KNX group address for retrieving the switch state. DPT 1

invert boolean (Optional, default: false)

Invert the telegrams payload before processing or sending.

respond_to_read boolean (Optional, default: false)

If true, the entity will respond to GroupValueRead telegrams received on the configured address by sending a GroupValueResponse to the same address. This is typically used when Home Assistant acts as the state provider for the KNX bus. In such cases, only address is configured, and state_address is not set. Read-requests to passive or state addresses don’t trigger responses.

entity_category string (Optional, default: None)

The category of the entity.

device_class string (Optional)

Sets the class of the device, changing the device state and icon that is displayed on the frontend.

The optional state_address can be used to inform Home Assistant about state changes not triggered by a telegram to the address e.g., if you configure a timer on a channel. If a KNX message is seen on the bus addressed to the given state address, this will overwrite the state of the switch object.

Text 

The KNX text platform allows to send text values to the KNX bus and update its state from received telegrams. It can optionally respond to read requests from the KNX bus.

 Note

Text entities without a state_address will restore their last known state after Home Assistant was restarted.

Texts that have a state_address configured request their current state from the KNX bus.

# Example configuration.yaml entry
knx:
  text:
    - name: "Info"
      address: "0/0/1"
    - name: "ASCII Info"
      address: "0/0/2"
      state_address: "0/0/3"
      type: string
    - name: "Greeting"
      address: "0/0/4"
      respond_to_read: true
YAML
 

Configuration Variables 

name string (Optional)

A name for this device used within Home Assistant.

address string | list Required

The group address to which new values will be sent.

state_address string | list (Optional)

Group address for retrieving the state from the KNX bus.

type string | integer (Optional, default: latin_1)

Either latin_1 for DPT 16.001 or string for DPT 16.000 (ASCII).

respond_to_read boolean (Optional, default: false)

If true, the entity will respond to GroupValueRead telegrams received on the configured address by sending a GroupValueResponse to the same address. This is typically used when Home Assistant acts as the state provider for the KNX bus. In such cases, only address is configured, and state_address is not set. Read-requests to passive or state addresses don’t trigger responses.

mode string (Optional, default: text)

Specifies the mode used in the UI. text or password are valid.

entity_category string (Optional, default: None)

The category of the entity.

Time 

The KNX time platform allows to send time values to the KNX bus and update its state from received telegrams. It can optionally respond to read requests from the KNX bus.

 Note

Time entities without a state_address will restore their last known state after Home Assistant was restarted.

Times that have a state_address configured request their current state from the KNX bus.

 Note

The day field of the time telegram will always be set to 0 (no day).

# Example configuration.yaml entry
knx:
  time:
    - name: "Time"
      address: "0/0/2"
      state_address: "0/0/2"
YAML
 

Configuration Variables 

name string (Optional)

A name for this device used within Home Assistant.

address string | list Required

The group address to which new values will be sent. DPT 10.001

state_address string | list (Optional)

Group address for retrieving the state from the KNX bus. DPT 10.001

respond_to_read boolean (Optional, default: false)

If true, the entity will respond to GroupValueRead telegrams received on the configured address by sending a GroupValueResponse to the same address. This is typically used when Home Assistant acts as the state provider for the KNX bus. In such cases, only address is configured, and state_address is not set. Read-requests to passive or state addresses don’t trigger responses.

sync_state boolean | string | integer (Optional, default: true)

Actively read the value from the bus. The maximum time interval (<minutes>) is 1440. The following values are valid

  • true equivalent to “expire 60” (default)
  • false no GroupValueRead telegrams will be sent to the bus
  • every <minutes> to update it regularly every <minutes>
  • expire <minutes> to read the state from the KNX bus when no telegram was received for <minutes>
  • <minutes> equivalent to “expire <minutes>”
  • init to just initialize the state on startup
entity_category string (Optional, default: None)

The category of the entity.

Weather 

The KNX weather platform is used as an interface to KNX weather stations.

To use your KNX weather station in your installation, add the following lines to your top-level KNX Integration configuration key in your configuration.yaml:

# Example configuration.yaml entry
knx:
  weather:
    - name: "Home"
      address_temperature: "7/0/0"
      address_brightness_south: "7/0/1"
      address_brightness_west: "7/0/2"
      address_brightness_east: "7/0/3"
      address_brightness_north: "7/0/11"
      address_wind_speed: "7/0/4"
      address_rain_alarm: "7/0/5"
      address_frost_alarm: "7/0/6"
      address_wind_alarm: "7/0/7"
      address_day_night: "7/0/8"
      address_air_pressure: "7/0/9"
      address_humidity: "7/0/10"
      sync_state: true
YAML
 

Configuration Variables 

name string (Optional, default: KNX Weather)

A name for this device used within Home Assistant.

address_temperature string | list Required

KNX group address for reading current outside temperature from KNX bus. DPT 9.001

address_brightness_south string | list (Optional)

KNX group address for reading current brightness to south coordinate from KNX bus. DPT 9.004

address_brightness_west string | list (Optional)

KNX group address for reading current brightness to west coordinate from KNX bus. DPT 9.004

address_brightness_east string | list (Optional)

KNX group address for reading current brightness to east coordinate from KNX bus. DPT 9.004

address_brightness_north string | list (Optional)

KNX group address for reading current brightness to north coordinate from KNX bus. DPT 9.004

address_wind_bearing string | list (Optional)

KNX group address for reading current wind bearing from KNX bus. DPT 5.003

address_wind_speed string | list (Optional)

KNX group address for reading current wind speed from KNX bus. DPT 9.005

address_rain_alarm string | list (Optional)

KNX group address for reading if rain alarm is on/off.

address_frost_alarm string | list (Optional)

KNX group address for reading if frost alarm is on/off.

address_wind_alarm string | list (Optional)

KNX group address for reading if wind alarm is on/off.

address_day_night string | list (Optional)

KNX group address for reading if it’s day/night.

address_air_pressure string | list (Optional)

KNX address reading current air pressure. DPT 9.006 or 14.058

address_humidity string | list (Optional)

KNX address for reading current humidity. DPT 9.007

sync_state boolean | string | integer (Optional, default: true)

Actively read the value from the bus. The maximum time interval (<minutes>) is 1440. The following values are valid

  • true equivalent to “expire 60” (default)
  • false no GroupValueRead telegrams will be sent to the bus
  • every <minutes> to update it regularly every <minutes>
  • expire <minutes> to read the state from the KNX bus when no telegram was received for <minutes>
  • <minutes> equivalent to “expire <minutes>”
  • init to just initialize the state on startup
entity_category string (Optional, default: None)

The category of the entity.

Known limitations 

  • The integration aims to be compatible with a wide variety of KNX devices from different manufacturers and eras. However, there are some devices that use non-standard DPT or use telegrams in a proprietary way. In these cases, you might not be able to configure entities directly through this integration. However, you may still use Template entities with the KNX telegram trigger to work around this.

  • USB bus interfaces are not directly supported by the underlying xknx library. However, you could try to run a software KNX router such as Calimero or knxd alongside Home Assistant to serve as a USB to IP bridge. For best reliability, using a certified KNX IP interface or router is recommended.

Troubleshooting / Common issues 

Logs for the KNX integration 

The xknx library is used for KNX communication. It provides various logging handlers for monitoring and debug purposes. Add the following lines to your Home Assistant configuration.yaml to activate them:

logger:
  default: warning
  logs:
    # For most debugging needs `xnx.log` and `xknx.telegram` are a good choice.
    xknx: info  # sets the level of all loggers
    # Loggers for different layers of KNX communication
    xknx.log: debug  # provides general information (connection, etc.)
    xknx.telegram: debug  # logs telegrams before they are being processed or sent
    xknx.cemi: debug  # logs incoming and outgoing CEMI frames
    xknx.data_secure: debug  # logs Data Secure relevant information
    xknx.ip_secure: debug  # logs IP Secure relevant information
    xknx.knx: debug  # logs incoming and outgoing KNX/IP frames
    xknx.raw_socket: warning  # logs incoming UDP/TCP frames in raw hex format at socket level
    # Loggers for xknx internals
    xknx.ga_dpt: warning  # logs when payloads can't be decoded with given project file information
    xknx.state_updater: warning  # provides information about the state updater
YAML
 

You can use the logger.set_level action to change the log level of a handler on a running instance. 

Group address can not be read 

Every *_state_address is read on startup sequentially if not configured differently. If you see the following errors in your log, a group address could not be read by a GroupValueRead request from Home Assistant in time.

> Could not sync group address '1/2/3' (Entity name - Feature)
> Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: '1/2/3'
Log
 

No group object (GO) assigned to the group address (GA) has the Read-Flag set in ETS 

  • Enable the read flag for one GO assigned to the GA. Use the one most likely to hold the current state (e.g., for a light entity’s brightness_state_address the according GO of the dimming actuator).

Response telegrams are not passing a line coupler, router or other filter in the installation 

  • Assign the group addresses used by Home Assistant to the used interface in ETS if your interface application supports that. ETS will generate filter tables that are applied to your line couplers after updating their application.
  • If your interface application doesn’t support that, use a dummy device in ETS for Home Assistant. These can be found in the ETS online catalog. Assign it to the line your interface connects Home Assistant to and link its group objects to the group addresses you are using in Home Assistant.

Unresponsive system 

  • The timeout for logging the errors (2 seconds) is started when the GroupValueRead request is scheduled to be sent. On systems experiencing high loads sending can be delayed (e.g., Raspberry Pi running lots of integrations at startup). Incoming response telegrams are always processed, so no information gets lost.

Duplicate entities 

If you find following error in your log you seem to have a duplicated entity in your configuration.

Platform knx does not generate unique IDs. ID 1/2/3 already exists - ignoring platform.name
Log
 

The unique_id for KNX entities is generated based on required configuration values.

  • binary_sensor: state_address
  • climate: temperature_address target_temperature_state_address target_temperature_address setpoint_shift_address
  • cover: move_long_address position_address
  • fan: address
  • light: address or all combined brightness_address if only individual_colors is used
  • notify: address
  • scene: address and scene_number
  • sensor: state_address
  • switch: address
  • weather: address_temperature

There can not be multiple entities on the same platform sharing these exact group addresses, even if they differ in other configuration.

Removing the integration 

This integration can be removed by following these steps:

To remove an integration instance from Home Assistant 

  1. Go to Settings > Devices & services and select the integration card.
  2. From the list of devices, select the integration instance you want to remove.
  3. Next to the entry, select the three dots  menu. Then, select Delete.

In addition, remove knx: from your configuration.yaml.

 Warning

Removing the integration will delete an uploaded keyring file, ETS project information, telegram history, and all entity configuration done via the UI panel.

Retour en haut