That would indeed work. However, it would also mean I have to list every individual sensor again in my template sensor (while they are already maintained in the group). Double maintenance etc… I was raised in a way that this should be avoided. ![:slight_smile: :slight_smile:](https://community.home-assistant.io/images/emoji/twitter/slight_smile.png?v=10)
I was able to do it quite easily in Node-Red (which is fine, since my follow up actions also needed to be defined in Node-Red).
[{"id":"76165f02cca6da54","type":"server-state-changed","z":"2d8992acfe659777","name":"Rookmelder Sensor changed ","server":"a32e766.db9aa88","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.rookmelder_sensoren_alarm","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":200,"y":140,"wires":[["159e1b60a14b7345"],[]]},{"id":"159e1b60a14b7345","type":"ha-get-entities","z":"2d8992acfe659777","name":"Get all rookmelder sensoren","server":"a32e766.db9aa88","version":0,"rules":[{"property":"entity_id","logic":"in_group","value":"binary_sensor.rookmelder_sensoren_alarm","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"data.RookmelderSensoren","output_results_count":1,"x":480,"y":140,"wires":[["566cc3f05f8fbe1a"]]},{"id":"566cc3f05f8fbe1a","type":"function","z":"2d8992acfe659777","name":"Identify the contact that triggered the group status change","func":"let trigger_id = msg.data.RookmelderSensoren.reduce((mostRecent, current) => {\n if (new Date(mostRecent.last_changed) > new Date(current.last_changed)) {\n return mostRecent;\n }\n return current;\n});\n\nreturn {\n payload: {\n sensor_id: trigger_id\n }\n};\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":830,"y":140,"wires":[["d746414f2f70ee02","1cecdb1c3c026a7e","f2ea03836a5ccc95"]]},{"id":"a32e766.db9aa88","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","areaSelector":"id","deviceSelector":"id","entitySelector":"id","statusSeparator":"","enableGlobalContextStore":false}]