Class: OpenHAB::Core::Events::ThingStatusInfoEvent

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

Overview

The AbstractEvent sent when a Things::Thing's status is set.

Instance Attribute Summary collapse

Attributes inherited from AbstractEvent

#attachment, #inputs, #source

Instance Method Summary collapse

Methods inherited from AbstractEvent

#payload

Instance Attribute Details

#statusorg.openhab.core.thing.ThingStatusInfo (readonly)

Returns The thing's status.

Returns:



51
# File 'lib/openhab/core/events/thing_status_info_event.rb', line 51

alias_method :status, :status_info

#thingThings::Thing (readonly)

Returns The thing that triggered this event.

Returns:



57
58
59
# File 'lib/openhab/core/events/thing_status_info_event.rb', line 57

def thing
  EntityLookup.lookup_thing(uid)
end

#uidThings::ThingUID (readonly)

Returns The UID of the Thing that triggered this event.

Returns:



46
# File 'lib/openhab/core/events/thing_status_info_event.rb', line 46

alias_method :uid, :get_thing_uid

Instance Method Details

#inspectString

Returns:

  • (String)


62
63
64
65
66
67
# File 'lib/openhab/core/events/thing_status_info_event.rb', line 62

def inspect
  s = "#<OpenHAB::Core::Events::ThingStatusInfoEvent thing=#{uid} " \
      "status=#{status.inspect}"
  s += " source=#{source.inspect}" if source
  "#{s}>"
end