# `NestGen2.Motion`
[🔗](https://github.com/integration-technology/nest_gen2_sdk/blob/v0.6.6/lib/nest_gen2/sensors.ex#L1)

The backplate's passive-infrared motion sensors (near and far).

`:motion` events fire when the level reaches the threshold or either sensor
flags a detection. Someone walking in is seen from about 4 m.

# `level`

```elixir
@spec level() :: non_neg_integer()
```

Latest motion level, 0 (nothing moving) to about 10.

# `set_threshold`

```elixir
@spec set_threshold(pos_integer()) :: :ok
```

Level from which movement counts as motion (default 2).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
