openhab-scripting 5.25.0 → 5.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5dd540981ebe38c1c9caa47519ef602482ae3f3f9fb9bdfce0c9f7f82e8354e7
4
- data.tar.gz: f41c35b263ae2806eb7bd0e5c921cf77992c772165b3dd772515f6208682b20e
3
+ metadata.gz: 5c898bc5ce08126c859ea18fa49311cb13db576df162bdad7b223d0a969af295
4
+ data.tar.gz: 667905c4ce354563a439ad31c2449a9d93e321871ab64983ea6a9a108f664096
5
5
  SHA512:
6
- metadata.gz: 15c663deb2da069fb03179638b89d7df1068c5dd1f7b16312dce90c81d97a8b949c6b60208855ea2b7c4ec6210aa2dca57ec7a29dc8ddc5abb3cc4ffe7ac4572
7
- data.tar.gz: 67043ce7f88d1c5cacb92f2cb172b7faaeb376d0ad2258901b603e61241e70732f41f5c2abcc05880daac2446fe9031f298112910c29bb69ffbdf81e18c760bc
6
+ metadata.gz: 9c8db7176dfcf4fceb4b6ab9b796c0bcaea2357e539992d8671bd63392f99deca570237ab9591b956cabb4066889eba63b85d7d4c26fbf911d16d027d2efd845
7
+ data.tar.gz: 621e91b24ecb04685e308df788982df4b66245bbb3f1fe28a1e221173c3bc63c8308d913ddd1d8162bf540fad8c9617b4c0fa01e08266db4ee4ba92cfa4987b9
@@ -176,6 +176,31 @@ module OpenHAB
176
176
  # @return [DecimalType, QuantityType, nil] The standard deviation between `start` and `finish`,
177
177
  # or nil if no states could be found.
178
178
 
179
+ # @!method median_since(timestamp, service = nil)
180
+ # Returns the median of the item's state since the given time
181
+ # @param [#to_zoned_date_time] timestamp The point in time from which to search
182
+ # @param [Symbol, String] service An optional persistence id instead of the default persistence service.
183
+ # @return [DecimalType, QuantityType, nil] The median since `timestamp`,
184
+ # or nil if no previous states could be found.
185
+ # @since openHAB 4.3
186
+
187
+ # @!method median_until(timestamp, service = nil)
188
+ # Returns the median of the item's state beetween now until the given time
189
+ # @param [#to_zoned_date_time] timestamp The point in time until which to search
190
+ # @param [Symbol, String] service An optional persistence id instead of the default persistence service.
191
+ # @return [DecimalType, QuantityType, nil] The median until `timestamp`,
192
+ # or nil if no future states could be found.
193
+ # @since openHAB 4.3
194
+
195
+ # @!method median_between(start, finish, service = nil)
196
+ # Returns the median of the item's state between two points in time
197
+ # @param [#to_zoned_date_time] start The point in time from which to search
198
+ # @param [#to_zoned_date_time] finish The point in time to which to search
199
+ # @param [Symbol, String] service An optional persistence id instead of the default persistence service.
200
+ # @return [DecimalType, QuantityType, nil] The median between `start` and `finish`,
201
+ # or nil if no states could be found.
202
+ # @since openHAB 4.3
203
+
179
204
  # @!method sum_since(timestamp, service = nil)
180
205
  # Returns the sum of the item's state since the given time
181
206
  # @param [#to_zoned_date_time] timestamp The point in time from which to search
@@ -661,6 +686,7 @@ module OpenHAB
661
686
  end
662
687
 
663
688
  def_persistence_methods(:average, quantify: true)
689
+ def_persistence_methods(:median, quantify: true) if OpenHAB::Core.version >= OpenHAB::Core::V4_3
664
690
  def_persistence_methods(:delta, quantify: true)
665
691
  def_persistence_methods(:deviation, quantify: true)
666
692
  def_persistence_methods(:sum, quantify: true)
@@ -30,6 +30,14 @@ module OpenHAB
30
30
  # # replace ':' with '_' in thing uid
31
31
  # mqtt_broker_mosquitto.online? # is mqtt:broker:mosquitto thing online?
32
32
  #
33
+ # @!attribute label
34
+ # Return the thing label
35
+ # @return [String]
36
+ #
37
+ # @!attribute location
38
+ # Return the thing location
39
+ # @return [String]
40
+ #
33
41
  # @!attribute [r] status
34
42
  # Return the {https://www.openhab.org/docs/concepts/things.html#thing-status thing status}
35
43
  # @return [org.openhab.core.thing.ThingStatus]
@@ -43,7 +51,7 @@ module OpenHAB
43
51
  #
44
52
  # @!attribute [r] bridge_uid
45
53
  # Return the Bridge UID when available.
46
- # @return [ThingUID]
54
+ # @return [ThingUID, nil]
47
55
  #
48
56
  # @!attribute [r] thing_type_uid
49
57
  # @return [ThingTypeUID]
data/lib/openhab/core.rb CHANGED
@@ -13,6 +13,8 @@ module OpenHAB
13
13
  V4_1 = Gem::Version.new("4.1.0").freeze
14
14
  # @!visibility private
15
15
  V4_2 = Gem::Version.new("4.2.0").freeze
16
+ # @!visibility private
17
+ V4_3 = Gem::Version.new("4.3.0").freeze
16
18
 
17
19
  # @return [Gem::Version] Returns the current openHAB version as a Gem::Version object
18
20
  # Note, this strips off snapshots, milestones and RC versions and returns the release version.
@@ -4,6 +4,6 @@ module OpenHAB
4
4
  module DSL
5
5
  # Version of openHAB helper libraries
6
6
  # @return [String]
7
- VERSION = "5.25.0"
7
+ VERSION = "5.26.0"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openhab-scripting
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.25.0
4
+ version: 5.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian O'Connell
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-08-20 00:00:00.000000000 Z
13
+ date: 2024-08-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler