Class: OpenHAB::Core::Items::Persistence::HistoricState
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- OpenHAB::Core::Items::Persistence::HistoricState
- Defined in:
- lib/openhab/core/items/persistence.rb
Overview
A state class with an added timestamp attribute.
This wraps HistoricItem to allow implicitly treating the object as its state, and wrapping of that state into a QuantityType as necessary.
Instance Attribute Summary collapse
- #timestamp ⇒ ZonedDateTime readonly
Instance Method Summary collapse
-
#initialize(state, historic_item) ⇒ HistoricState
constructor
A new instance of HistoricState.
Constructor Details
#initialize(state, historic_item) ⇒ HistoricState
Returns a new instance of HistoricState.
55 56 57 58 |
# File 'lib/openhab/core/items/persistence.rb', line 55 def initialize(state, historic_item) @historic_item = historic_item super(state) end |
Instance Attribute Details
#timestamp ⇒ ZonedDateTime (readonly)
62 63 64 |
# File 'lib/openhab/core/items/persistence.rb', line 62 def @historic_item. end |