Class: Tinkerforge::BrickletCO2V2

Inherits:
Object
  • Object
show all
Defined in:
lib/tinderfridge/devices/bricklet_co2_v2/bricklet_co2_v2.rb

Instance Method Summary collapse

Instance Method Details

#stateObject

Returns the device’s state.



6
7
8
9
10
11
12
13
14
15
# File 'lib/tinderfridge/devices/bricklet_co2_v2/bricklet_co2_v2.rb', line 6

def state
  av = get_all_values
  super.merge(
    'co2_concentration'  => av[0],
    'temperature'        => av[1],
    'temperature_offset' => get_temperature_offset,
    'humidity'           => av[2],
    'air_pressure'       => get_air_pressure,
  )
end