Send to KNX bus
The Send to KNX bus action writes data directly to one or more KNX group addresses. You can send a raw payload or have Home Assistant encode a value using a KNX datapoint type (DPT).
This is useful when you want to control a KNX device or update a value on the bus from an automation or script, without modeling that device as a separate entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] in Home Assistant.
Using this action from the user interface
If you prefer building automations and scripts visually, Home Assistant walks you through this action step by step. You pick what to target, tweak a few options, and save. No YAML knowledge required.
To send data to the KNX bus from an automation or a script:
- Go to Settings > Automations & scenes.
- Open an existing automation or script, or select Create automation > Create new automation.
- If you’re setting up a new automation, add a trigger in the When section. Scripts don’t need a trigger. They run when something else calls them.
- In the Then do section, select Add action.
- From the search box, search for and select KNX: Send to KNX bus.
- Enter the Group address and the Payload to send. Optionally, set a Value type to encode the payload as a DPT.
- Select Save.
This action does not support targets. In the UI, you are not prompted to choose an area, device, entity, or label.
Options in the UI
The group address(es) to write to. Provide a list to send to multiple group addresses one after another.
The payload to send to the bus. When no value type is set, the payload is sent as raw bytes. Integers are then treated as DPT 1, 2, or 3 payloads. For DPTs larger than 6 bits, send a list where each value represents one octet (0-255), and pad the list with 0 to match the DPT byte length.
If set, the payload is encoded as the given DPT instead of being sent as raw bytes. The KNX sensor types are valid values. See the list of types in the KNX sensor section.
Using this action in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, refer to this action as knx.send. A basic example looks like this:
action: knx.send
data:
address: "1/1/1"
type: percent
payload: 50
This sends the value 50 to group address 1/1/1, encoded as a percentage.
Options in YAML
The group address(es) to write to. A list sends to multiple group addresses one after another.
The payload to send to the bus. When type is not set, raw bytes are sent. Integers are then treated as DPT 1, 2, or 3 payloads. For DPTs larger than 6 bits, send a list where each value represents one octet (0-255), and pad the list with 0 to match the DPT byte length.
If set, the payload is encoded as the given DPT instead of being sent as raw bytes. The KNX sensor types are valid values. See the list of types in the KNX sensor section.
Try it yourself
Ready to test this? Open Developer tools > Actions, search for this action, fill in the fields, and select Perform action. You see what happens on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] without writing a line of YAML.
More examples
Real scenarios where this action shows up in automations and scripts. Copy any example and adapt it to your setup.
You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.
Script: send a fixed value and an entity state
This script sends a value to the bus in three different ways: encoded as a DPT, as a raw byte value, and from a Home Assistant entity state.
YAML example for sending values to the KNX bus
alias: "Send values to KNX"
sequence:
- action: knx.send
data:
address: "1/1/1"
type: percent
payload: 50
- action: knx.send
data:
# 50% as a 1-byte raw value
address: "1/1/1"
payload: [128]
- action: knx.send
data:
address: "3/3/3"
type: temperature
payload: "{{ states('sensor.dew_point') }}"
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the action you’re calling and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.
Related actions
These actions work well alongside this one:
-
Read from KNX bus: Sends GroupValueRead requests to the KNX bus.
-
Register knx_event: Adds or removes group addresses in the knx_event filter.
-
Expose to KNX bus: Adds or removes exposures to the KNX bus.