Change group entities not working anymore?

In the past this changed my group entities but it’s not working anymore. What is changed?

                data1 = []

                for key in response:
                    data1.append(key['sensor'].replace('-', '_').replace(' ', '_'))
                self.hass.states.set('group.rd4', 'on', {'entity_id': data1, 'friendly_name': 'RD4 pickup date'})

Nobody an idea?

Writing data1 to log seems to work and the error is gone.
Even the group.rd4 is updated now.
What is happening here?