class Tinkerforge::BrickletOutdoorWeather
Public Instance Methods
sensors()
click to toggle source
Returns the last measured data for all sensors.
The result is a Hash, with sensor identifiers as the keys. Values per sensor are:
-
0: Temperature (°C)
-
1: Relative humidity (%RH)
-
2: Last change (seconds)
# File lib/tinderfridge/devices/bricklet_outdoor_weather/bricklet_outdoor_weather.rb, line 11 def sensors get_sensor_identifiers.map do |id| [ id, get_sensor_data(id).each_with_index.map { |v,i| i == 0 ? v/10.0 : v } ] end.to_h end