Class: OpenHAB::Core::Events::ThingStatusInfoChangedEvent

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

Overview

The AbstractEvent sent when a Thing's status has changed.

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:



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

alias_method :status, :status_info

#thingThings::Thing (readonly)

Returns The thing that triggered this event.

Returns:



27
28
29
# File 'lib/openhab/core/events/thing_status_info_event.rb', line 27

def thing
  EntityLookup.lookup_thing(uid)
end

#uidThings::ThingUID (readonly)

Returns The UID of the Thing that triggered this event.

Returns:



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

alias_method :uid, :get_thing_uid

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

Returns The thing's prior status.

Returns:



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

alias_method :was, :get_old_status_info

Instance Method Details

#inspectString

Returns:

  • (String)


32
33
34
35
36
37
# File 'lib/openhab/core/events/thing_status_info_event.rb', line 32

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