Class: Redlink::Thermostat

Inherits:
Redthing show all
Defined in:
lib/redlink/thermostat.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Redthing

#initialize

Constructor Details

This class inherits a constructor from Redlink::Redthing

Instance Attribute Details

#can_control_scheduleObject

Returns the value of attribute can_control_schedule.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def can_control_schedule
  @can_control_schedule
end

#device_nameObject

Returns the value of attribute device_name.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def device_name
  @device_name
end

#domain_idObject

Returns the value of attribute domain_id.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def domain_id
  @domain_id
end

#fanObject

Returns the value of attribute fan.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def fan
  @fan
end

#humidificationObject

Returns the value of attribute humidification.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def humidification
  @humidification
end

#instanceObject

Returns the value of attribute instance.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def instance
  @instance
end

#mac_idObject

Returns the value of attribute mac_id.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def mac_id
  @mac_id
end

#thermostat_idObject

Returns the value of attribute thermostat_id.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def thermostat_id
  @thermostat_id
end

#thermostats_alertsObject

Returns the value of attribute thermostats_alerts.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def thermostats_alerts
  @thermostats_alerts
end

#uiObject

Returns the value of attribute ui.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def ui
  @ui
end

#upgradingObject

Returns the value of attribute upgrading.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def upgrading
  @upgrading
end

#user_defined_device_nameObject

Returns the value of attribute user_defined_device_name.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def user_defined_device_name
  @user_defined_device_name
end

#will_support_scheduleObject

Returns the value of attribute will_support_schedule.



3
4
5
# File 'lib/redlink/thermostat.rb', line 3

def will_support_schedule
  @will_support_schedule
end

Instance Method Details

#nameObject



11
12
13
# File 'lib/redlink/thermostat.rb', line 11

def name
  user_defined_device_name || device_name
end

#refreshObject



19
20
21
# File 'lib/redlink/thermostat.rb', line 19

def refresh
  @ui = Ui.new Endpoint.get_volatile_thermostat_data(self.thermostat_id)
end

#to_sObject



15
16
17
# File 'lib/redlink/thermostat.rb', line 15

def to_s
  "#{name} - #{ui}"
end