Motion detection on all Senors

I am sure this is a simple problem, just curious on other with a different approach. Curious if anyone has tackled the way to use ALL motion senors in the house to see if there is motion and trigger an alarm.

i.e. When I am away, if any motion is detected in the house I was to notify me. Issue is we add and remove motion sensors from time to time, what is the best approach so this automation just keep working even if I add or remove one or two?

I hope this makes sense?

Create a binary sensor group containing all your motion sensors. Detection on any of the sensors will turn the group on - that change of state can be used to trigger an automation to send a notification.

You just need to add sensors to this group and your automation will continue to work.

This may also help if you want it fully automatic - but I would be wary that you didn’t end up with a sensor you didn’t want in the group:

I’d go for an automation that triggers at startup and any other prefered time and add the following action:

service: group.set
data:
  object_id: motion_sensors
  name: Motion Sensors
  entities: '{{ states.binary_sensor|selectattr("attributes.device_class", "defined")|selectattr("attributes.device_class","eq","motion")|map(attribute="entity_id")|list}}' 

In case you are using areas and only want that sensors that belong to a certain area, you could approach the entities like this:

{{ expand(area_entities(area_id('<AREA NAME>')))|selectattr('attributes.device_class', 'defined')|selectattr('attributes.device_class','eq','motion')|map(attribute='entity_id')|list }}

Edit:
And of course, you then use the group in a state-trigger to trigger your automation(s).