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.
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
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.