class NestWrapper::Device

Attributes

config_data[RW]
country[RW]
name[RW]
state[RW]
zip[RW]

Public Class Methods

new(status) click to toggle source
# File lib/nest_wrapper/device.rb, line 5
def initialize(status)
  self.name        = NestWrapper.nest.status['structure'][NestWrapper.nest.status['structure'].keys.first]['name']
  self.zip         = NestWrapper.nest.status['structure'][NestWrapper.nest.status['structure'].keys.first]['postal_code']
  self.country     = NestWrapper.nest.status['structure'][NestWrapper.nest.status['structure'].keys.first]['country_code']
  self.config_data = NestWrapper.nest.status['device'][NestWrapper.nest.status['device'].keys.first]

  self.state = NestWrapper::State.new(status)
end