Presence - Away/Home with Google relay 2.0


#1

1) Give a description of the problem
Got my hub v3 two days ago, changing over from Homey. I tried testing this flow with gf coming home, but it didnt trigger on the first part.

2) What is the expected behavior?
Basicly if

Im home and gf comes home -> then alert over google relay
Gf home and i come home -> then alert over google relay
I come home and gf not home -> set home mode, send text to GF and a welcome message relay (after 2 min)
Gf come home and im not home -> set home mode, send text to me, and welcome message to gf (after 2 min)
If we both have status away and mode is not away, set away

3) What is happening/not happening?
The part im home and gf comes didnt trigger when gf went from away to present just now.

4) Post a Green Snapshot of the pistonimage


#2

Not sure why this isn’t working but I suggest rearranging a little along these lines:

If presence sensor 1 changes to present
Then
  If presence sensor 2 is present
   Then
      Send message
   Else
      Send message
   End if
Endif
If presence sensor 2 changes to present
Then
  If presence sensor 1 is present
  Then
      Send message
   Else
      Send message
   End if
End if
If presence sensor 1 changes to not present
Then
  If presence sensor 2 is not present
  Then
     Away
  End if
End if
Etc.

#3

I got it to work, seems it doenst like capital leters in the string at the top in define section.

I also cleaned up the code a little based on your tips :slight_smile:
thanks