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

Running an app on a computer instead of a Nest, for developing and testing
screens without deploying (see `docs/host.md`).

With `config :nest_gen2, target: :host` the SDK starts as usual but touches no
hardware: the screen is drawn in memory (`NestGen2.Display.snapshot/0`), the
ring and its press come from these functions or the browser viewer
(`NestGen2.Host.Viewer`), the climate is a steady simulated reading, and
deep sleep, the clock and Wi-Fi are left alone.

These functions produce the same events as the real hardware, so the app
can't tell the difference.

# `click`

```elixir
@spec click() :: :ok
```

A short press of the ring.

# `climate`

```elixir
@spec climate(number(), number()) :: :ok
```

Sets the simulated room reading and sends it as a `:climate` event.

# `double_click`

```elixir
@spec double_click() :: :ok
```

Two quick presses (a `:double_click` gesture).

# `long_press`

```elixir
@spec long_press() :: :ok
```

A press held long enough for a `:long_press` gesture.

# `motion`

```elixir
@spec motion(0..10) :: :ok
```

Someone moving near the Nest (wakes the screen if motion is a wake source).

# `screenshot`

```elixir
@spec screenshot() :: binary()
```

The screen as a PNG.

# `step`

```elixir
@spec step(:cw | :ccw) :: :ok
```

Turns the ring one step (`NestGen2.Dial.set_step/1`) clockwise or anticlockwise.

# `turn`

```elixir
@spec turn(number()) :: :ok
```

Turns the ring by `degrees`, clockwise if positive.

---

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