openhab-scripting 2.20.3 → 2.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openhab/dsl/monkey_patch/items/persistence.rb +6 -1
- data/lib/openhab/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b163016271e25f2e7e4607db6bb97d3e1fadc1e19b6d8a0396560278aa70c4ea
|
4
|
+
data.tar.gz: e133649130e7c960f0e4b1174fe20644111d933f339aabe8256dbfcf39862f10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c93bb71565595e355f1e8a3669bff9a389bbc92bc1d7f1b27e534c055c6bbfb45bc39d2220672d06e061c099c48cc73fdfad72642959e2c0abc8329f13bd5811
|
7
|
+
data.tar.gz: 5cf280a5718af694e89d2f5c8262bd6930ef8dea1bf61f697e72391bb0be58089e6c7677e1c2a22b6dfe31f7fb16c137706f1ecadcf76fcacd8f9280225b542b
|
@@ -49,7 +49,12 @@ module OpenHAB
|
|
49
49
|
if timestamp.is_a? Java::JavaTimeTemporal::TemporalAmount
|
50
50
|
timestamp = Java::JavaTime::ZonedDateTime.now.minus(timestamp)
|
51
51
|
end
|
52
|
-
PersistenceExtensions.public_send(method, self, timestamp, service&.to_s)
|
52
|
+
result = PersistenceExtensions.public_send(method, self, timestamp, service&.to_s)
|
53
|
+
if result.is_a?(Java::OrgOpenhabCoreLibraryTypes::DecimalType) && respond_to?(:unit) && unit
|
54
|
+
Quantity.new(Java::OrgOpenhabCoreLibraryTypes::QuantityType.new(result.to_big_decimal, unit))
|
55
|
+
else
|
56
|
+
result
|
57
|
+
end
|
53
58
|
end
|
54
59
|
end
|
55
60
|
|
data/lib/openhab/version.rb
CHANGED