Search documentation of grizzly

# View Source Grizzly.VirtualDevices.TemperatureSensor (grizzly v7.4.2)

A virtual device for a temperature sensor

This virtual device reports changes in the sensor every minute using the `Grizzly.ZWave.Commands.SensorMultilevelReport` command.

If you want a faster or slower reporting interval you can configure the `:report_interval` option.

# Summary

## Types

opt()

Init options

state()

## Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

start_link(opts)

Start the temperature sensor

# Types

Link to this type

# opt()

View Source

    @type opt() :: {:report_interval, non_neg_integer()} | {:force_report, boolean()}

Init options

- `:report_interval` - the time in milliseconds to read and maybe report temp changes, default `60_000`
- `:force_report` - report all temperature readings, default false (will only report if the temperature changed from last reading)

Link to this type

# state()

View Source

    @type state() :: %{
      temp: non_neg_integer(),
      force_report: boolean(),
      device_id: Grizzly.VirtualDevices.id()
    }

# Functions

Link to this function

# child_spec(init_arg)

View Source

Returns a specification to start this module under a supervisor.

See `Supervisor`.

Link to this function

# start_link(opts)

View Source

    @spec start_link([opt()]) :: GenServer.on_start()

Start the temperature sensor