Theory of operation:
At the moment, you can’t directly get the modified time of a state variable, so we can’t pluck the time when
GroupStatus_grpcyhjmza changes directly. So,
xxx_lasthome stores the “previous” value of
xxx_ishome is the group status containing the geofence condition, grabbed using the
getstate() function. The
xxx_changetime variable uses an
if() expression to return the current time if last home state and current home state are different (i.e. state has changed); otherwise it returns its own previous value (no change).
xxx_text builds the readable text.
The Expressions page in the wiki documents the functions used (and has links to docs for other expression info related to the underlying library, LuaXP).