class Netatmo::DashboardData::HealthIndex

Attributes

time[RW]
unit[RW]
value[RW]

Public Class Methods

new(data) click to toggle source
# File lib/netatmo/dashboard_data/health_index.rb, line 12
def initialize(data)
  return if data.nil?

  self.time = Time.at(data['time_utc'])
  self.value = data['health_idx'].to_i
end

Public Instance Methods

health_idx() click to toggle source
# File lib/netatmo/dashboard_data/health_index.rb, line 25
def health_idx
  value
end
health_index() click to toggle source
# File lib/netatmo/dashboard_data/health_index.rb, line 29
def health_index
  value
end
status() click to toggle source
# File lib/netatmo/dashboard_data/health_index.rb, line 19
def status
  Netatmo::Util::HealthIndex.value(value)
end