Knx configuration more complex with 0.115

Since version 0.115 entities of knx are now inside the integration domain.
I have more than 700 lines of knx definition (more than 150 entities) and it was organised by purpose (lightning, blinds, heat or fan control …).
Is there a way to define them without grouping them by entity type ?
For example I would like to define the sensor, light, switch of a KNX object together, instead of spiting in the sensor list, light list and switch list.

This was required by HA https://github.com/home-assistant/architecture/blob/3a280053dbd12c80776ba271155a95c9ebb666b2/adr/0007-integration-config-yaml-structure.md

How did you organize different entity types before this change?

Before 0.115 I was able to do multiple lists using numbers after the entity type:

#garage
switch 2:
    - platform: knx
      ...
sensor 2:
...

binary sensor 2:
...

#heating
switch 3:
...
sensor 3:
...
binary sensor 3:
...

As a parallel, my KNX group is organisation is

  • 0/X/X : lights
    • 0/0/X : global
    • 0/1/X : floor 1
    • 0/2/X : floor 2
  • 1/X/X : heating
    • 1/0/X : global
    • 1/1/X : floor 1
    • 1/2/X : floor 2
  • 2/X/X : blinds
  • 3/X/X : sockets

each section has multiple types.

It would be great if we could create sections in the knx integration configuration:

knx:
  section "lights":
    binary_sensor:
    switch:
    sensor: 
    light:
  section "heating":
    binary_sensor:
    switch:
    sensor: 
    climate:
...

I would also be happy to have separate yaml files with “include” for the different sections (but not per entity type)

Thanks for the thread. I downgraded to 0.114 yesterday after having no clue why my complicated KNX integration, which worked flawlessly sincs 0.47, stopped working.
I don’t have time to rewrite the whole configuration, let alone read me into how do do it and will be sticking to 0.114 then :frowning:

essentially you’ll have to

  • find your knx entities,
  • cut&past them under the knx: key,
  • ident them with 2 more spaces and
  • remove platform: knx

so

knx:

switch:
  # this is top level - here could have been knx and non-knx switches
  - platform: knx
    name: "Switch"
    address: "6/5/4"

will become

knx:
  switch:
  # here are only (and every) knx switches
    - name: "Switch"
      address: "6/5/4"

@farmio I changed this:

knx:
  tunneling:
    host: '192.168.1.154'
    port: 3671
    local_ip: '192.168.1.140'
light:
  - platform: knx
    name: Entrada focos
    address: '1/1/9'
    state_address: '1/3/9'

to this:

knx:
  tunneling:
    host: '192.168.1.154'
    port: 3671
    local_ip: '192.168.1.140'
  light:
    - name: 'Entrada focos'
      address: '1/1/9'
      state_address: '1/3/9'

But it still doesn’t work.
What do you mean by “remove platform: knx” ?

UPDATE:
Solved!! In my ~100 KNX entites, I had a cover with a position_state_address: ‘’ (blank)
That never caused a problem, until now.
So, I assigned the correct KNX address, and my KNX integration is now fully functional again.

2 Likes