Working with Groups - how to identify triggering group member and compare [SOLVED]

Hi everyone,

I am coming from openhab and working with groups was one of the most effective process to do things batch wise.

What I am after is the following:
I have a group of a few ETFs and another group with threshold prices for each of these ETFs.
So, I would like to create an automation which triggers, when a member of the ETF Group changes (price increase / decrease) - that’s easy.

The name of the ETF group member matches quite well to the other groups member (threshold group) containing the “buy” price level.
E.g. Current ETF price (ETF Group)

ETF Amundi Nasdaq (LYX00F)

Buy price for this ETF: (ETF Threshold Group)

ETF Amundi Nasdaq Threshold (Buy)

What I am looking for is a way to compare the triggering ETF with its Threshold price (e.g. checking with REGEX to get the according Threshold price from the triggering entities name and compare <>.

If there is someone out there who did a similar thing already, I would greatly appreciate a feedback.

Never mind.
My faster, but not really beautiful solution uses mutiple triggers like:

trigger:
  - platform: numeric_state
    entity_id:
      - sensor.etf_amundi_gl_eco_esg_i2_a2pcq5
    below: input_number.etf_amundi_global_eco_threshold_buy
    id: GlobalEco

It might be nice to know, if there is a “group” solution as well, because I used it a lot in the old openhab times.