Class: NestConnect::Device::Thermostat

Inherits:
BaseDevice
  • Object
show all
Defined in:
lib/nest_connect/devices/thermostat.rb

Constant Summary collapse

TARGET_TEMPERATURE_F_RANGE =
(50..90)
TARGET_TEMPERATURE_C_RANGE =
(9..30)
FAN_TIMER_DURATION_VALUES =
[15, 30, 45, 60, 120, 240, 480, 720]
HVAC_MODE_VALUES =
['heat', 'cool', 'heat-cool', 'eco', 'off']
TEMPERATURE_SCALE_VALUES =
['C', 'F']

Instance Attribute Summary collapse

Attributes inherited from BaseDevice

#access_token

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseDevice

all, from_hash_collection, #reload

Constructor Details

#initialize(api_class: self.class.api_class, **args) ⇒ Thermostat

Returns a new instance of Thermostat.



11
12
13
14
15
16
# File 'lib/nest_connect/devices/thermostat.rb', line 11

def initialize(api_class: self.class.api_class, **args)
  @api_class = api_class
  args.each do |key, value|
    instance_variable_set("@#{key}", value)
  end
end

Instance Attribute Details

#ambient_temperature_cObject (readonly)

Returns the value of attribute ambient_temperature_c.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def ambient_temperature_c
  @ambient_temperature_c
end

#ambient_temperature_fObject (readonly)

Returns the value of attribute ambient_temperature_f.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def ambient_temperature_f
  @ambient_temperature_f
end

#can_coolObject (readonly)

Returns the value of attribute can_cool.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def can_cool
  @can_cool
end

#can_heatObject (readonly)

Returns the value of attribute can_heat.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def can_heat
  @can_heat
end

#device_idObject (readonly)

Returns the value of attribute device_id.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def device_id
  @device_id
end

#eco_temperature_high_cObject (readonly)

Returns the value of attribute eco_temperature_high_c.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def eco_temperature_high_c
  @eco_temperature_high_c
end

#eco_temperature_high_fObject (readonly)

Returns the value of attribute eco_temperature_high_f.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def eco_temperature_high_f
  @eco_temperature_high_f
end

#eco_temperature_low_cObject (readonly)

Returns the value of attribute eco_temperature_low_c.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def eco_temperature_low_c
  @eco_temperature_low_c
end

#eco_temperature_low_fObject (readonly)

Returns the value of attribute eco_temperature_low_f.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def eco_temperature_low_f
  @eco_temperature_low_f
end

#fan_timer_activeObject

Returns the value of attribute fan_timer_active.



48
49
50
# File 'lib/nest_connect/devices/thermostat.rb', line 48

def fan_timer_active
  @fan_timer_active
end

#fan_timer_durationObject

Returns the value of attribute fan_timer_duration.



59
60
61
# File 'lib/nest_connect/devices/thermostat.rb', line 59

def fan_timer_duration
  @fan_timer_duration
end

#fan_timer_timeoutObject (readonly)

Returns the value of attribute fan_timer_timeout.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def fan_timer_timeout
  @fan_timer_timeout
end

#has_fanObject (readonly)

Returns the value of attribute has_fan.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def has_fan
  @has_fan
end

#has_leafObject (readonly)

Returns the value of attribute has_leaf.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def has_leaf
  @has_leaf
end

#humidityObject (readonly)

Returns the value of attribute humidity.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def humidity
  @humidity
end

#hvac_modeObject

Returns the value of attribute hvac_mode.



72
73
74
# File 'lib/nest_connect/devices/thermostat.rb', line 72

def hvac_mode
  @hvac_mode
end

#hvac_stateObject (readonly)

Returns the value of attribute hvac_state.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def hvac_state
  @hvac_state
end

#is_lockedObject (readonly)

Returns the value of attribute is_locked.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def is_locked
  @is_locked
end

#is_onlineObject (readonly)

Returns the value of attribute is_online.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def is_online
  @is_online
end

#is_using_emergency_heatObject (readonly)

Returns the value of attribute is_using_emergency_heat.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def is_using_emergency_heat
  @is_using_emergency_heat
end

#labelObject

Returns the value of attribute label.



83
84
85
# File 'lib/nest_connect/devices/thermostat.rb', line 83

def label
  @label
end

#last_connectionObject (readonly)

Returns the value of attribute last_connection.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def last_connection
  @last_connection
end

#localeObject (readonly)

Returns the value of attribute locale.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def locale
  @locale
end

#locked_temp_max_cObject (readonly)

Returns the value of attribute locked_temp_max_c.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def locked_temp_max_c
  @locked_temp_max_c
end

#locked_temp_max_fObject (readonly)

Returns the value of attribute locked_temp_max_f.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def locked_temp_max_f
  @locked_temp_max_f
end

#locked_temp_min_cObject (readonly)

Returns the value of attribute locked_temp_min_c.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def locked_temp_min_c
  @locked_temp_min_c
end

#locked_temp_min_fObject (readonly)

Returns the value of attribute locked_temp_min_f.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def locked_temp_min_f
  @locked_temp_min_f
end

#nameObject (readonly)

Returns the value of attribute name.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def name
  @name
end

#name_longObject (readonly)

Returns the value of attribute name_long.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def name_long
  @name_long
end

#previous_hvac_modeObject (readonly)

Returns the value of attribute previous_hvac_mode.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def previous_hvac_mode
  @previous_hvac_mode
end

#software_versionObject (readonly)

Returns the value of attribute software_version.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def software_version
  @software_version
end

#structure_idObject (readonly)

Returns the value of attribute structure_id.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def structure_id
  @structure_id
end

#sunlight_correction_activeObject (readonly)

Returns the value of attribute sunlight_correction_active.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def sunlight_correction_active
  @sunlight_correction_active
end

#sunlight_correction_enabledObject (readonly)

Returns the value of attribute sunlight_correction_enabled.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def sunlight_correction_enabled
  @sunlight_correction_enabled
end

#target_temperature_cObject

Returns the value of attribute target_temperature_c.



35
36
37
# File 'lib/nest_connect/devices/thermostat.rb', line 35

def target_temperature_c
  @target_temperature_c
end

#target_temperature_fObject

Returns the value of attribute target_temperature_f.



20
21
22
# File 'lib/nest_connect/devices/thermostat.rb', line 20

def target_temperature_f
  @target_temperature_f
end

#target_temperature_high_cObject

Returns the value of attribute target_temperature_high_c.



92
93
94
# File 'lib/nest_connect/devices/thermostat.rb', line 92

def target_temperature_high_c
  @target_temperature_high_c
end

#target_temperature_high_fObject

Returns the value of attribute target_temperature_high_f.



110
111
112
# File 'lib/nest_connect/devices/thermostat.rb', line 110

def target_temperature_high_f
  @target_temperature_high_f
end

#target_temperature_low_cObject

Returns the value of attribute target_temperature_low_c.



101
102
103
# File 'lib/nest_connect/devices/thermostat.rb', line 101

def target_temperature_low_c
  @target_temperature_low_c
end

#target_temperature_low_fObject

Returns the value of attribute target_temperature_low_f.



119
120
121
# File 'lib/nest_connect/devices/thermostat.rb', line 119

def target_temperature_low_f
  @target_temperature_low_f
end

#temperature_scaleObject

Returns the value of attribute temperature_scale.



130
131
132
# File 'lib/nest_connect/devices/thermostat.rb', line 130

def temperature_scale
  @temperature_scale
end

#time_to_targetObject (readonly)

Returns the value of attribute time_to_target.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def time_to_target
  @time_to_target
end

#time_to_target_trainingObject (readonly)

Returns the value of attribute time_to_target_training.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def time_to_target_training
  @time_to_target_training
end

#where_idObject (readonly)

Returns the value of attribute where_id.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def where_id
  @where_id
end

#where_nameObject (readonly)

Returns the value of attribute where_name.



141
142
143
# File 'lib/nest_connect/devices/thermostat.rb', line 141

def where_name
  @where_name
end

Class Method Details

.api_classObject



7
8
9
# File 'lib/nest_connect/devices/thermostat.rb', line 7

def self.api_class
  NestConnect::API::Devices::Thermostat
end