View Source Grizzly.VirtualDevices.TemperatureSensor (grizzly v5.0.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.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Start the temperature sensor
Link to this section 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, default60_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()}
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link([opt()]) :: GenServer.on_start()
Start the temperature sensor