> For the complete documentation index, see [llms.txt](https://homey.solweb.no/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://homey.solweb.no/aggregated-state/home-state.md).

# Home state

One of the most important states of my home is whether or not there is anyone at home.

I've created a boolean logic variable `home`for this purpose.

### Person presence

I got one boolean presence variable for each person with the Homey app. See more information on [Person presence](/aggregated-state/person-presence.md).

### Guests

Often we have guests that stays for several days, and they may be at home even if none of us are present.

I've added a **virtual device** for Guests present. Each morning I get a notification if the visitor flag is turned on, to make sure I flip it off if the guests are gone. I've mapped the virtual device for guests to a boolean flag along with the other boolean presence variables.

### Aggregated state

![](/files/-LtnahAKhbAW1qP6SiEo)

Note: `presence-besok`, is norwegian, and it translates to presence-guests.

### Fall back when someone arrives home

As a fall back if someone arrives back at home, without the presence working properly, or if the kids enter home before the parents, I explicitly flip `home` to true always when the door lock opens.

![](/files/-LtnbU9geVx6O-l6PdMS)
