You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_integrations/knx.markdown
+24-8Lines changed: 24 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -195,25 +195,37 @@ local_ip:
195
195
196
196
```yaml
197
197
knx:
198
-
event_filter:
199
-
- "1/0/*"
200
-
- "6/2,3,4-6/*"
198
+
event:
199
+
- address:
200
+
- "0/1/*"
201
+
- address:
202
+
- "1/2/*"
203
+
- "1/3/2-4"
204
+
type: "2byte_unsigned"
205
+
- address:
206
+
- "3/4/5"
207
+
type: "2byte_float"
201
208
```
202
209
203
210
{% configuration %}
204
-
event_filter:
205
-
description: Defines a list of patterns for filtering KNX group addresses. Telegrams with destination addresses matching this pattern are sent to the Home Assistant event bus as `knx_event`.
206
-
required: false
211
+
address:
212
+
description: 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`.
213
+
required: true
207
214
type: [list, string]
215
+
type:
216
+
description: 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](#sensor) (e.g., "2byte_float" or "1byte_signed").
217
+
type: [string, integer]
218
+
required: false
208
219
{% endconfiguration %}
209
220
210
-
Every telegram that matches the filter with its destination field will be announced on the event bus as a `knx_event` event containing data attributes
221
+
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
211
222
212
223
- `data`contains the raw payload data (e.g., 1 or "[12, 55]").
213
224
- `destination`the KNX group address the telegram is sent to as string (e.g., "1/2/3).
214
225
- `direction`the direction of the telegram as string ("Incoming" / "Outgoing").
215
226
- `source`the KNX individual address of the sender as string (e.g., "1.2.3").
216
227
- `telegramtype`the APCI service of the telegram. "GroupValueWrite", "GroupValueRead" or "GroupValueResponse" generate a knx_event.
228
+
- `value`contains the decoded payload value if `type` is configured for the address. Will be `None` for "GroupValueRead" telegrams.
217
229
218
230
## Services
219
231
@@ -289,7 +301,7 @@ automation:
289
301
290
302
### Register Event
291
303
292
-
The `knx.event_register` service can be used to register (or unregister) group addresses to fire `knx_event` Events. Events for group addresses matching the `event_filter` attribute in `configuration.yaml` cannot be unregistered. See [knx_event](#events)
304
+
The `knx.event_register` service 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](#events)
293
305
294
306
{% configuration %}
295
307
address:
@@ -301,6 +313,10 @@ remove:
301
313
required: false
302
314
type: boolean
303
315
default: false
316
+
type:
317
+
description: If set, the payload will be decoded as given DPT in the event data `value` key. KNX sensor types are valid values [KNX Sensor](#sensor) (e.g., "2byte_float" or "1byte_signed").
0 commit comments