class TempoIQ::Sensor

The container for a stream of time series DataPoints.

Attributes

attributes[RW]

Indexable attributes. Useful for grouping related sensors. EG - {'unit' => 'F', 'model' => 'FHZ343'}

key[R]

The sensor primary key [String]

name[RW]

Human readable name of the sensor [String] EG - “Thermometer 1”

Public Class Methods

new(key, name = "", attributes = {}) click to toggle source
# File lib/tempoiq/models/sensor.rb, line 14
def initialize(key, name = "", attributes = {})
  @key = key
  @name = name
  @attributes = attributes
end

Public Instance Methods

to_hash() click to toggle source
# File lib/tempoiq/models/sensor.rb, line 20
def to_hash
  {
    'key' => key,
    'name' => name,
    'attributes' => attributes
  }
end