Class: OpenHAB::Core::Events::ChannelTriggeredEvent

Inherits:
AbstractEvent
  • Object
show all
Defined in:
lib/openhab/core/events/channel_triggered_event.rb

Overview

AbstractEvent sent when a channel triggers.

Instance Attribute Summary collapse

Attributes inherited from AbstractEvent

#attachment, #inputs, #source

Instance Method Summary collapse

Methods inherited from AbstractEvent

#payload

Instance Attribute Details

#channelThings::Channel? (readonly)

Returns The channel that triggered this event.

Returns:



# File 'lib/openhab/core/events/channel_triggered_event.rb', line 18

#channel_uidThings::ChannelUID (readonly)

Returns The UID of the Channel that triggered this event.

Returns:



16
# File 'lib/openhab/core/events/channel_triggered_event.rb', line 16

alias_method :channel_uid, :get_channel

#eventString (readonly)

Returns The event data.

Returns:

  • (String)

    The event data



# File 'lib/openhab/core/events/channel_triggered_event.rb', line 25

#thingThings::Thing? (readonly)

Returns The thing that triggered this event.

Returns:



23
# File 'lib/openhab/core/events/channel_triggered_event.rb', line 23

def_delegators :channel_uid, :thing, :channel

Instance Method Details

#inspectString

Returns:

  • (String)


29
30
31
32
33
# File 'lib/openhab/core/events/channel_triggered_event.rb', line 29

def inspect
  s = "#<OpenHAB::Core::Events::ChannelTriggeredEvent channel=#{channel} event=#{event.inspect}"
  s += " source=#{source.inspect}" if source
  "#{s}>"
end