Grouping guest devices (ip's on a guest network)

Hi there,

I’m using a the SRM integration to track who’s home. The great thing about the SRM integration is that it also tracks my guest network (ip’s starting with 192.168.2, that are outside my home network, and not reachable by home assistant).

I create one person in home assistant called “guest” so i can keep track if a guest is present (a parent babysitting etc).

So ideally i would like to group all devices starting with 192.168.2, into one device, or add them all automatically to the person called guest.

Curious how other people are handling this.


I have the method below utlized right now, however, Im not sure its more automated than what you described.

As the Unifi device trackers are not automatically added I have to manually add them to be ‘active’ (not hidden) in HA. After that it works great.

Have you run into issues yet with devices using randomized MAC addresses?

Thanks! Thats a great idea! The devices are added automatically every time some one is entering the guest network and since the ip range is different ill try this template sensor for now:

      # --------------------------------
      - name: "guest devices"
        state: > 
            states.device_tracker |
            selectattr('state', 'eq', 'home') |
            selectattr('attributes.ip_addr','defined') |
            selectattr('attributes.ip_addr', 'search', "192.168.2.") |
            list |