Class: Netatmo::Weather::IndoorModule

Inherits:
BatteryDevice show all
Defined in:
lib/netatmo/weather/indoor_module.rb

Instance Attribute Summary collapse

Attributes inherited from BatteryDevice

#battery_percent, #battery_status, #battery_vp

Attributes inherited from Device

#code, #dashboard_data, #data_types, #firmware, #id, #last_message, #last_seen, #last_setup, #module_name, #reachable, #rf_status, #type

Instance Method Summary collapse

Methods inherited from Device

#battery?, #co2?, #data, #health_index?, #humidity?, #name, #noise?, parse, #pressure?, #rain?, #temperature?, #values, #wind?

Constructor Details

#initialize(data) ⇒ IndoorModule

DeviceType: NAModule4



9
10
11
12
13
14
15
# File 'lib/netatmo/weather/indoor_module.rb', line 9

def initialize(data)
  super(data)

  self.co2 = DashboardData::CO2.new(data['dashboard_data'])
  self.humidity = DashboardData::Humidity.new(data['dashboard_data'])
  self.temperature = DashboardData::Temperature.new(data['dashboard_data'])
end

Instance Attribute Details

#co2Object

Returns the value of attribute co2.



6
7
8
# File 'lib/netatmo/weather/indoor_module.rb', line 6

def co2
  @co2
end

#humidityObject

Returns the value of attribute humidity.



6
7
8
# File 'lib/netatmo/weather/indoor_module.rb', line 6

def humidity
  @humidity
end

#temperatureObject

Returns the value of attribute temperature.



6
7
8
# File 'lib/netatmo/weather/indoor_module.rb', line 6

def temperature
  @temperature
end