View Source Grizzly.VirtualDevices.TemperatureSensor (grizzly v8.3.0)

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

Init options

Functions

Returns a specification to start this module under a supervisor.

Start the temperature sensor

Types

@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)
@type state() :: %{
  temp: non_neg_integer(),
  force_report: boolean(),
  device_id: Grizzly.VirtualDevices.id()
}

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

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

Start the temperature sensor