Group entity: using "update_entity" service does not cause update of entities inside a group

Consider these sensors:

template:
  - sensor:

      - name: test_group_sensor
        state: 12

      - name: test_group_sensor_2
        state: 34

And this group:

group:
  test_group_sensor:
    entities:
      - sensor.test_group_sensor
      - sensor.test_group_sensor_2

Then edit those sensors’ states via Dev tools and call this service:

service: homeassistant.update_entity
data: {}
target:
  entity_id: group.test_group_sensor

Seems that this call does not cause updating all entities inside the group.
Is that a proper behaviour?

Registered an issue:

That’s an oldschool group… last I remember old school groups don’t have great rules for the overall state and that’s unlikely to change. If you want a sensor group with calculations, use the new sensor group added in 2023.2.

Hmmm, seems I know nothing about these “new groups”. Are you talking about groups which may only be made in UI?

Yes. Old school groups really only react to on/off entities, all other calculations are not the main focus of old school groups.

Is it possible to define new groups in YAML ?
Or are they managed via UI only? If so - this is, let’s say, a strange decision.

They are UI only.

No, seems that yaml config is available for these “new style groups”.
BTW even for this “new style group” calling the “homeassistant.update_entity” service does NOT cause updating “inner” entities.

sensor:
  - platform: group
    name: test_group_sensor_new
    type: sum
    entities:
      - sensor.test_group_sensor
      - sensor.test_group_sensor_2

Change values for “inner” sensors via “dev tools → set state”, then call the “homeassistant.update_entity” service - it will not cause updating “inner” sensors.
Seems that old/new groups are mainly to reflect a “common state” (like “all lights are ON”, “total sum is 123”) and not for a “group” update by service.

Conclusion: calling “homeassistant.update_entity” service for a group (old style, new style) will NOT cause updating “inner” entities.

I must have read your question wrong. I could have told you updating the group will not update the inner entities. For some reason I thought you meant that the inner entities updating the group state. Sorry for the confusion

It’s OK, thank you for a clarification!

Ditto. I responded to Ildar_Gabdullin’s Core Issue and it took some back and forth before I realized the Issue was based on a misunderstanding of what homeassistant.update_entity does and does not do. Namely, it updates the targeted entity and not entities that may compose it.

I have no idea what led to the belief it’s able to traverse the entire tree of underlying entities and updating each one. There’s nothing in the documentation suggesting it behaves this way … and just trying the service call demonstrates that it doesn’t. So it took me some time to realize that this was the misconception he had.

Correct, as I said in GitHub:
“Since group may represent a set of entities - I thought updating a group should cause updating these entities.” I was wrong.