Class: Redlink::Ui
Instance Attribute Summary collapse
-
#can_set_switch_auto ⇒ Object
Returns the value of attribute can_set_switch_auto.
-
#can_set_switch_cool ⇒ Object
Returns the value of attribute can_set_switch_cool.
-
#can_set_switch_emergency_heat ⇒ Object
Returns the value of attribute can_set_switch_emergency_heat.
-
#can_set_switch_heat ⇒ Object
Returns the value of attribute can_set_switch_heat.
-
#can_set_switch_off ⇒ Object
Returns the value of attribute can_set_switch_off.
-
#can_set_switch_southern_away ⇒ Object
Returns the value of attribute can_set_switch_southern_away.
-
#commercial ⇒ Object
Returns the value of attribute commercial.
-
#cool_lower_setpt_limit ⇒ Object
Returns the value of attribute cool_lower_setpt_limit.
-
#cool_next_period ⇒ Object
Returns the value of attribute cool_next_period.
-
#cool_setpoint ⇒ Object
Returns the value of attribute cool_setpoint.
-
#cool_upper_setpt_limit ⇒ Object
Returns the value of attribute cool_upper_setpt_limit.
-
#created ⇒ Object
Returns the value of attribute created.
-
#deadband ⇒ Object
Returns the value of attribute deadband.
-
#disp_temperature ⇒ Object
Returns the value of attribute disp_temperature.
-
#displayed_units ⇒ Object
Returns the value of attribute displayed_units.
-
#dual_setpoint_status ⇒ Object
Returns the value of attribute dual_setpoint_status.
-
#heat_lower_setpt_limit ⇒ Object
Returns the value of attribute heat_lower_setpt_limit.
-
#heat_next_period ⇒ Object
Returns the value of attribute heat_next_period.
-
#heat_setpoint ⇒ Object
Returns the value of attribute heat_setpoint.
-
#heat_upper_setpt_limit ⇒ Object
Returns the value of attribute heat_upper_setpt_limit.
-
#hold_until_capable ⇒ Object
Returns the value of attribute hold_until_capable.
-
#indoor_humidity ⇒ Object
Returns the value of attribute indoor_humidity.
-
#outdoor_humidity ⇒ Object
Returns the value of attribute outdoor_humidity.
-
#outdoor_temp ⇒ Object
Returns the value of attribute outdoor_temp.
-
#sched_cool_sp ⇒ Object
Returns the value of attribute sched_cool_sp.
-
#sched_heat_sp ⇒ Object
Returns the value of attribute sched_heat_sp.
-
#schedule_capable ⇒ Object
Returns the value of attribute schedule_capable.
-
#status_cool ⇒ Object
Returns the value of attribute status_cool.
-
#status_heat ⇒ Object
Returns the value of attribute status_heat.
-
#system_switch_position ⇒ Object
Returns the value of attribute system_switch_position.
-
#thermostat_locked ⇒ Object
Returns the value of attribute thermostat_locked.
-
#vacation_hold ⇒ Object
Returns the value of attribute vacation_hold.
Instance Method Summary collapse
Methods inherited from Redthing
Constructor Details
This class inherits a constructor from Redlink::Redthing
Instance Attribute Details
#can_set_switch_auto ⇒ Object
Returns the value of attribute can_set_switch_auto.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def can_set_switch_auto @can_set_switch_auto end |
#can_set_switch_cool ⇒ Object
Returns the value of attribute can_set_switch_cool.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def can_set_switch_cool @can_set_switch_cool end |
#can_set_switch_emergency_heat ⇒ Object
Returns the value of attribute can_set_switch_emergency_heat.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def can_set_switch_emergency_heat @can_set_switch_emergency_heat end |
#can_set_switch_heat ⇒ Object
Returns the value of attribute can_set_switch_heat.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def can_set_switch_heat @can_set_switch_heat end |
#can_set_switch_off ⇒ Object
Returns the value of attribute can_set_switch_off.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def can_set_switch_off @can_set_switch_off end |
#can_set_switch_southern_away ⇒ Object
Returns the value of attribute can_set_switch_southern_away.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def can_set_switch_southern_away @can_set_switch_southern_away end |
#commercial ⇒ Object
Returns the value of attribute commercial.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def commercial @commercial end |
#cool_lower_setpt_limit ⇒ Object
Returns the value of attribute cool_lower_setpt_limit.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def cool_lower_setpt_limit @cool_lower_setpt_limit end |
#cool_next_period ⇒ Object
Returns the value of attribute cool_next_period.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def cool_next_period @cool_next_period end |
#cool_setpoint ⇒ Object
Returns the value of attribute cool_setpoint.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def cool_setpoint @cool_setpoint end |
#cool_upper_setpt_limit ⇒ Object
Returns the value of attribute cool_upper_setpt_limit.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def cool_upper_setpt_limit @cool_upper_setpt_limit end |
#created ⇒ Object
Returns the value of attribute created.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def created @created end |
#deadband ⇒ Object
Returns the value of attribute deadband.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def deadband @deadband end |
#disp_temperature ⇒ Object
Returns the value of attribute disp_temperature.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def disp_temperature @disp_temperature end |
#displayed_units ⇒ Object
Returns the value of attribute displayed_units.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def displayed_units @displayed_units end |
#dual_setpoint_status ⇒ Object
Returns the value of attribute dual_setpoint_status.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def dual_setpoint_status @dual_setpoint_status end |
#heat_lower_setpt_limit ⇒ Object
Returns the value of attribute heat_lower_setpt_limit.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def heat_lower_setpt_limit @heat_lower_setpt_limit end |
#heat_next_period ⇒ Object
Returns the value of attribute heat_next_period.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def heat_next_period @heat_next_period end |
#heat_setpoint ⇒ Object
Returns the value of attribute heat_setpoint.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def heat_setpoint @heat_setpoint end |
#heat_upper_setpt_limit ⇒ Object
Returns the value of attribute heat_upper_setpt_limit.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def heat_upper_setpt_limit @heat_upper_setpt_limit end |
#hold_until_capable ⇒ Object
Returns the value of attribute hold_until_capable.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def hold_until_capable @hold_until_capable end |
#indoor_humidity ⇒ Object
Returns the value of attribute indoor_humidity.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def indoor_humidity @indoor_humidity end |
#outdoor_humidity ⇒ Object
Returns the value of attribute outdoor_humidity.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def outdoor_humidity @outdoor_humidity end |
#outdoor_temp ⇒ Object
Returns the value of attribute outdoor_temp.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def outdoor_temp @outdoor_temp end |
#sched_cool_sp ⇒ Object
Returns the value of attribute sched_cool_sp.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def sched_cool_sp @sched_cool_sp end |
#sched_heat_sp ⇒ Object
Returns the value of attribute sched_heat_sp.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def sched_heat_sp @sched_heat_sp end |
#schedule_capable ⇒ Object
Returns the value of attribute schedule_capable.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def schedule_capable @schedule_capable end |
#status_cool ⇒ Object
Returns the value of attribute status_cool.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def status_cool @status_cool end |
#status_heat ⇒ Object
Returns the value of attribute status_heat.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def status_heat @status_heat end |
#system_switch_position ⇒ Object
Returns the value of attribute system_switch_position.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def system_switch_position @system_switch_position end |
#thermostat_locked ⇒ Object
Returns the value of attribute thermostat_locked.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def thermostat_locked @thermostat_locked end |
#vacation_hold ⇒ Object
Returns the value of attribute vacation_hold.
5 6 7 |
# File 'lib/redlink/ui.rb', line 5 def vacation_hold @vacation_hold end |
Instance Method Details
#cooling? ⇒ Boolean
46 47 48 |
# File 'lib/redlink/ui.rb', line 46 def cooling? status_cool.to_i == 1 end |
#heating? ⇒ Boolean
42 43 44 |
# File 'lib/redlink/ui.rb', line 42 def heating? status_heat.to_i == 1 end |
#overridden? ⇒ Boolean
50 51 52 |
# File 'lib/redlink/ui.rb', line 50 def overridden? heat_setpoint != sched_heat_sp && cool_setpoint != sched_cool_sp end |
#status ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/redlink/ui.rb', line 54 def status if heating? if overridden? return '(heating via override)' else return '(heating)' end elsif cooling? if overridden? return '(cooling via override)' else return '(cooling)' end end end |
#to_s ⇒ Object
70 71 72 |
# File 'lib/redlink/ui.rb', line 70 def to_s "#{disp_temperature.to_i}° / #{heat_setpoint}° #{status}" end |