Use entity reference for GA in knx.telegram trigger

Hello!

I’m currently doing my first steps with Home Assistant.

I was having a problem where an event would only trigger the first time a KNX button was pressed. Since the device’s state doesn’t change when the button is pressed again, the automation event isn’t triggered.
I then realized that I need to use KNX Telegram Triggers so that the event triggers every time the button is pressed. This is how the trigger configuration in YAML looks like:

trigger: knx.telegram
options:
  destination:
    - 2/2/6
    - 2/2/7
    - 2/2/8
  group_value_write: true
  group_value_response: false
  group_value_read: false
  incoming: true
  outgoing: true
  type: '1'

That seems to be working. It just bothers me that I have to manually enter the group addresses again. Is there any way I can specify a reference to the entity from which the group address should be used?

Thank you very much for your help.

Regards,
NehCoy

Hi :waving_hand:!

How did you configure that? Did you use an entity? Which type?
If you just want to use it in an automation, the knx.telegram trigger is perfectly fine. If you want this to have some representation in the UI or have history, you’ll likely want to create a binary sensor out of it.

Do you mean like a template to get group addresses out of an entity_id ? That’s not possible.

Hello @farmio!

How did you configure that? Did you use an entity? Which type?

Yes, I tried using the entities before, but as I mentioned, it unfortunately didn’t work.
The type is light, like

trigger: light.turned_on
target:
  entity_id: light.deckenleuchte
options:
  behavior: each
  for: '00:00:00'

Do you mean like a template to get group addresses out of an entity_id ? That’s not possible.

Yeah, something like a template like this dummy

{{ knx_address('light.deckenleuchte) }}

Yeah, a light is either on or off. When on, it can’t be turned more on. Albeit it can change brightness attribute, but that’s something different.

Knx binary sensors and I think switches however would support that.

I’ll test it. - So I’ve to create an additional button-entity with the same group address, right?

Additional to what?
I think there are some confusions there - why do you want to know if the group address was triggered with same value as previously - so no state change?

Additional to the existing “light” configuration
The reason for this is that a switch doesn’t directly turn on the light; it only powers the outlet for the light of the mirror. However, this light can be turned off at the mirror itself. This happens from time to time.
When you turn on the light in the room, the blinds should move to the “closed” position.
But if the “mirror light” is essentially already on (even though it’s turned off at the mirror), this isn’t detected. And I don’t want people to have to turn the light off first and then on again.

That’s the reason why I want to detect each “light on”.