Class: OpenHAB::Core::Events::ItemStateUpdatedEvent
- Inherits:
-
ItemEvent
- Object
- AbstractEvent
- ItemEvent
- OpenHAB::Core::Events::ItemStateUpdatedEvent
- Includes:
- ItemState
- Defined in:
- lib/openhab/core/events/item_state_updated_event.rb
Overview
AbstractEvent sent when an item's state has updated.
Instance Attribute Summary collapse
-
#last_state_update ⇒ ZonedDateTime
readonly
The time the previous state update occurred.
Attributes included from ItemState
Attributes inherited from ItemEvent
Attributes inherited from AbstractEvent
Instance Method Summary collapse
Methods included from ItemState
#closed?, #down?, #null?, #off?, #on?, #open?, #paused?, #playing?, #state?, #undef?, #up?
Methods inherited from AbstractEvent
Instance Attribute Details
#last_state_update ⇒ ZonedDateTime (readonly)
Returns the time the previous state update occurred.
|
# File 'lib/openhab/core/events/item_state_updated_event.rb', line 18
|
Instance Method Details
#inspect ⇒ String
23 24 25 26 27 28 29 |
# File 'lib/openhab/core/events/item_state_updated_event.rb', line 23 def inspect s = "#<OpenHAB::Core::Events::ItemStateUpdatedEvent item=#{item_name} state=#{item_state.inspect}" # @deprecated OH4.3 remove respond_to? check when dropping OH 4.3 s += " last_state_update=#{last_state_update}" if respond_to?(:last_state_update) && last_state_update s += " source=#{source.inspect}" if source "#{s}>" end |