# \[Beginner\] Smart Porch Light Tutorial

**URL:** <https://community.homey.app/t/beginner-smart-porch-light-tutorial/4512>\
**Category:** Flows\
**Tags:** tutorial\
**Created:** [November 27, 2018, 7:08am UTC](https://community.homey.app/t/beginner-smart-porch-light-tutorial/4512 "2018-11-27T07:08:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [November 27, 2018, 7:20am UTC](https://community.homey.app/t/beginner-smart-porch-light-tutorial/4512/4 "2018-11-27T07:20:09Z")

</div>

## `{and}`

* * *

Just as we can add additional `{then}` actions to a flow we can also easily add additional conditions which must be met before the actions will trigger. These are called `{and}` because `{when}` a trigger happens `{and}` another criteria is met `{then}` the action happens.

It might be worth noting that if the `{and}` criteria is not met then the action will not happen.

Or in our case, `{when}` the sun sets **`{and}` we are not home** `{then}` turn on the porch light, `{then}` set the homey to 100% brightness.

## Ingredients

1. [[Fibaro Switch]](https://apps.athom.com/app/com.fibaro) (But you can use any smart light globe or switch.)
2. _[Date & Time]_ card, which give us access to time, date, day and even sun actions.
3. _[LED Ring]_ card, which gives us access to some homey LED ring actions.
4. _[Presence]_ card, which give us access to actions about peoples presence in the house.

## Actions

- `{when}`
- **`{and}`**
- `{then}` x 2

## Method

Just like the previous examples, we will be just adding a new card, this time though we will be adding it to the `{and}` section.

1. After clicking edit, slide up the `{and}` section.
2. Click the ⨁ Add Card and a list of possible conditions will load.
3. Select the _[Presence]_ condition and the options for that condition will be shown.
4. Select the option _[Nobody is home]_ then follow the normal process for saving.

| | | | | | |
| --- | --- | --- | --- | --- | --- |
| ![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/9/9a0d8fc1ab4391ba98d67df1159996e88634632a.jpeg) | ![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/7/712c9c28be35b71c401f0b9bc1b5b0d70d6e3e69.png) | ![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/c/c95cab20ecff050105b2071c8db3227c0f2944d1.png) | ![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/4/4f56c782b724d74745c2871b5e72f430dec07d10.png) | ![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/9/91975e948663a24aaae620ec3a3533092e3fff8c.jpeg) | ![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/3/3c472ac7b1cb70dc6d29650ed291c5444799d4f4.jpeg) |

> `{when}` Sunset `{and}` Not Home `{then}` Turn on light `{then}` set Ring LED to 100% brightness.

## Outcome

That’s it, now the porch light will only come on if no one is home.

---

_[View the full topic](https://community.homey.app/t/beginner-smart-porch-light-tutorial/4512)._
