KNX Binary Sensor


The knx integration must be configured correctly to use this integration, see KNX Integration.

The knx sensor platform allows you to monitor KNX binary sensors.

Binary sensors are read-only. To write to the knx-bus configure an exposure KNX Integration - Expose.

Configuration

The knx integration must be configured correctly, see KNX Integration.

# Example configuration.yaml entry
binary_sensor:
  - platform: knx
    state_address: '6/0/2'

Configuration Variables

state_address

(string)(Required)

KNX group address of the binary sensor.

name

(string)(Optional)

A name for this device used within Home Assistant.

sync_state

(boolean)(Optional)

Actively read the value from the bus. If False no GroupValueRead telegrams will be sent to the bus.

Default value:

true

device_class

(string)(Optional)

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

significant_bit

(integer)(Optional)

Specify which significant bit of the KNX value should be used.

Default value:

1

reset_after

(integer)(Optional)

Reset back to OFF state after specified milliseconds.

Automation actions

You can also attach actions to binary sensors (e.g., to switch on a light when a switch was pressed). In this example, one light is switched on when the button was pressed once and two others when the button was pressed a second time.

# Example configuration.yaml entry
binary_sensor:
  - platform: knx
    name: Livingroom.3Switch3
    state_address: '5/0/26'
    automation:
      - counter: 1
        hook: 'on'
        action:
          - entity_id: light.hue_color_lamp_1
            service: homeassistant.turn_on
      - counter: 2
        hook: 'on'
        action:
          - entity_id: light.hue_bloom_1
            service: homeassistant.turn_on
          - entity_id: light.hue_bloom_2
            service: homeassistant.turn_on

Configuration Variables

name

(string)(Optional)

A name for this device used within Home Assistant.

counter

(integer)(Optional)

Set to 2 if your only want the action to be executed if the button was pressed twice. To 3 for three times button pressed.

Default value:

1

hook

(string)(Optional)

Indicates if the automation should be executed on what state of the binary sensor. Values are “on” or “off”.

Default value:

on

action

(list)(Optional)

Specify a list of actions analog to the automation rules.