Class: OpenHAB::Core::DTO::ItemChannelLinkDTO

Inherits:
Object
  • Object
show all
Defined in:
lib/openhab/core/dto/item_channel_link.rb

Overview

Adds methods to core openHAB ItemChannelLinkDTO to make it more natural in Ruby

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#channel_uidThings::ChannelUID (readonly)



27
28
29
# File 'lib/openhab/core/dto/item_channel_link.rb', line 27

def channel_uid
  Things::ChannelUID.new(channelUID)
end

#itemItem (readonly)



19
20
21
# File 'lib/openhab/core/dto/item_channel_link.rb', line 19

def item
  EntityLookup.lookup_item(itemName)
end

#item_nameString (readonly)



# File 'lib/openhab/core/dto/item_channel_link.rb', line 10


Instance Method Details

#to_sString



32
33
34
# File 'lib/openhab/core/dto/item_channel_link.rb', line 32

def to_s
  "#{item_name} -> #{channelUID}"
end