Getting the KNX group address from a device

Hello everyone,
I have been trying but I do not seem to be able to get KNX group addresses to be attached to an entity.

I am trying to create a script that will turn all the lights in the house on and then off individually to see if they are working through the KNX.

However I cant seem to get a list of the address not attach the addresses to the entities in any way other then manual, which I would rather avoid as I work in several instalations.

In my config file I have

knx:
#     # Control Section
  light: !include_dir_merge_list knx/knx_light
  cover: !include_dir_merge_list knx/knx_cover

with those folders have yaml files with contents along the lines of

- name: Example - Light
  address: '5/0/37'
  state_address: '5/1/37'
  brightness_address: '5/2/37'
  brightness_state_address: '5/3/37'

So I assume that somehow the HA has this addresses stored somewhere, considering I am giving it to the knx.
So if the HA has access to this files is there anyway I can also access them through an automation? It feels like there should be a way for me to access this information

If you could help me that would be great, thank you for your attention

You can use knx.send to send a value to the KNX group you have setup to turn everything On/Off

I would not recommend sending an On/Off to each component in your KNX bus.

The problem is that I wanted to do them individually, so I can test if each of them is working properly. And because I work with different instalation I wanted to do something that could utilize only the information that the Home Assistant has and that dosent require me to manually configure it

You will have to configure either an entity via the yaml or the KNX integration after you imported your ETS project file, the latter makes it much easier tho.

But HA has no way of knowing what is in your KNX installation without you telling what is in there. No Autodiscover or anything like that.

If its only for testing you can use the knx.send in the Developer tools

In my config file I have

knx:
#     # Control Section
  light: !include_dir_merge_list knx/knx_light
  cover: !include_dir_merge_list knx/knx_cover

with those folders have yaml files with contents along the lines of

- name: Example - Light
  address: '5/0/37'
  state_address: '5/1/37'
  brightness_address: '5/2/37'
  brightness_state_address: '5/3/37'

So I assume that somehow the HA has this addresses stored somewhere, considering I am giving it to the knx.
So if the HA has access to this files is there anyway I can also access them through an automation? It feels like there should be a way for me to access this information

Ah after that edit, now i understand the question. Maybe @farmio knows more.
Here ends my knowledge :wink:

1 Like

Thanks a lot for the help anyway :slight_smile:

1 Like

I don’t think that config is exposed to users via templates or such, but I could be wrong.

You could probably just filter all your entities by integration and go ahead from there, using standard actions (turn_on etc.). See https://www.home-assistant.io/docs/configuration/templating/#entities-for-an-integration

From what I have seen they do not which is rather unfortunate. I have considered that option but I fear that those would be too little for a full range of tests (for example you can turn a light on and off but there none to adjust brightness or rgbw). I will try doing it without the group address and see if that will be enough.

Would be really good if you could access the address through templates though