How to only notify people who are home at the moment?

Hi All,

By measuring power usage of appliances I can determine if a device is done doing what it is supposed to do (dishwasher, laundry, etc), notifying everybody in the group “family”.

As an enhancement, I would like to only send notifications to those people in the group “family” who are actually home. And if no-one is home at that moment, notify the whole family group.

I am not sure how to approach this? In ‘pseudo-code’ it would require to:
if (group.family.state == ‘not home’)
{ notify everybody in groupmfamily }
else
{ for each entity in group.family
if (group.family.[entity].state == ‘home’)
{ notify
}
}
}

but looking into ways to get this done I am not sure if this would be an app or a template or something. Guess, I do not have a good understanding of which is doing what exactly…

Can anybody provide pointers in the/a right direction?

Depending on your notification platform, some accept a “target” attribute. You might try using that in conjunction with a data_template. I think we’d need to know the type of notifications you’re using.

right now I am just sending a text using pushover, but I want to explore other notifications, most specifically the actionable ios notifications using the ios app.