openhab-scripting 2.14.0 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6851ec9dce8db775e48aaf7d08078281e2a2e9c1d6a2c2cd379de0d3fd2391f0
|
4
|
+
data.tar.gz: 2f656d9cb621d3826c72c2aa588d1ba478108bc30cffd32bf8e0e5fae85dbe47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 248767b8ec14f2f68412f152755beb872b15b6db26b363cc0837419e16f044b8c6b078843cd93c4efe8fe03358256df7cb8d390ebe43ddb6ad00b962ecb197ce
|
7
|
+
data.tar.gz: 9bb8e09d8a34c96b220b16b209c92cf5fce0f1bd54f28086ed3f6e4ae83ab24b0288bb828d9b2111fec3fbef10025b70624b13005140690ce5a9b2556df1a132
|
@@ -59,7 +59,7 @@ module OpenHAB
|
|
59
59
|
if dimension
|
60
60
|
[Quantity.new(other), to_qt]
|
61
61
|
elsif @number_item.state?
|
62
|
-
[
|
62
|
+
[other.to_d, @number_item.state.to_big_decimal.to_d]
|
63
63
|
end
|
64
64
|
else
|
65
65
|
logger.trace("#{self} cannot be coereced to #{other.class}")
|
@@ -85,7 +85,7 @@ module OpenHAB
|
|
85
85
|
@number_item.state <=> other.state
|
86
86
|
end
|
87
87
|
when Numeric
|
88
|
-
@number_item.state.to_big_decimal.to_d <=>
|
88
|
+
@number_item.state.to_big_decimal.to_d <=> other.to_d
|
89
89
|
when String
|
90
90
|
@number_item.state <=> QuantityType.new(other) if dimension
|
91
91
|
end
|
@@ -199,7 +199,7 @@ module OpenHAB
|
|
199
199
|
to_d.public_send(operation, other.to_d)
|
200
200
|
end
|
201
201
|
elsif other.is_a? Numeric
|
202
|
-
to_d.public_send(operation,
|
202
|
+
to_d.public_send(operation, other.to_d)
|
203
203
|
elsif dimension && other.is_a?(String)
|
204
204
|
to_qt.public_send(operation, Quantity.new(other))
|
205
205
|
elsif other.respond_to? :coerce
|
@@ -46,7 +46,7 @@ module OpenHAB
|
|
46
46
|
when QuantityType
|
47
47
|
quantity
|
48
48
|
when Numeric
|
49
|
-
QuantityType.new(
|
49
|
+
QuantityType.new(quantity.to_d.to_java, AbstractUnit::ONE)
|
50
50
|
else
|
51
51
|
raise "Unexpected type #{quantity.class} provided to Quantity initializer"
|
52
52
|
end
|
@@ -152,7 +152,7 @@ module OpenHAB
|
|
152
152
|
logger.trace("Number Item coerced result a(#{a.class})='#{a}' b(#{b.class})='#{b}'")
|
153
153
|
[a.quantity, b.quantity]
|
154
154
|
when Numeric
|
155
|
-
[quantity, QuantityType.new(
|
155
|
+
[quantity, QuantityType.new(other.to_d.to_java, AbstractUnit::ONE)]
|
156
156
|
else
|
157
157
|
raise TypeError,
|
158
158
|
"Operation '#{operation}' cannot be performed between #{self} and #{other.class}"
|
data/lib/openhab/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openhab-scripting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.14.
|
4
|
+
version: 2.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian O'Connell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|