I’m looking into setting up presence-detection. I’d like to use the info from OpenWRT-router, where I want to consider the MAC-addresses of both my and my wife’s phone (I already have the entities for this available in HA). Furthermore I’d also like to be considered “present” when one of the light switches is (manually) operated combined with a countdown timer. I’d like to combine all of this into a single entity/switch I can use in my automations and scripts.
I’ve no idea what the best approach is. I suspect using a group for all the different “presence-detections” but I have no idea how to implement the countdown timer which is triggered when one of the switches is operated. Anyone have any ideas/hints?
I would suggest creating sensors for each of the criteria you want. E.g., one that triggers on any light switch is operated and then turns off after the timer and one for the presence of the phones. Then create another sensor which just AND/ORs them together as appropriate, and use that last one.
(BTW – I find that all our family phones change their MAC addresses all the time for privacy so I have no way to track them. Did you turn that off on your phones, or is there another solution?)