Class: Aurora::DHW

Inherits:
Component show all
Defined in:
lib/aurora/dhw.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Component

#initialize, #inspect

Constructor Details

This class inherits a constructor from Aurora::Component

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



7
8
9
# File 'lib/aurora/dhw.rb', line 7

def enabled
  @enabled
end

#runningObject (readonly) Also known as: running?

Returns the value of attribute running.



7
8
9
# File 'lib/aurora/dhw.rb', line 7

def running
  @running
end

#set_pointObject

Returns the value of attribute set_point.



7
8
9
# File 'lib/aurora/dhw.rb', line 7

def set_point
  @set_point
end

#water_temperatureObject (readonly)

Returns the value of attribute water_temperature.



7
8
9
# File 'lib/aurora/dhw.rb', line 7

def water_temperature
  @water_temperature
end

Instance Method Details

#refresh(registers) ⇒ Object



14
15
16
17
18
19
# File 'lib/aurora/dhw.rb', line 14

def refresh(registers)
  @enabled = registers[400]
  @running = registers[1104].include?(:dhw)
  @set_point = registers[401]
  @water_temperature = registers[1114]
end

#registers_to_readObject



10
11
12
# File 'lib/aurora/dhw.rb', line 10

def registers_to_read
  [400..401, 1114]
end