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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61465187d78f8e9a3d7ad5aeec2fab9ebd8875b1799397fa0d47ef2bfae50e6b
4
- data.tar.gz: c5d76638ae55a32c23d582dd637b0dd511d22e2dd20c23c8c920e1799f310379
3
+ metadata.gz: b163016271e25f2e7e4607db6bb97d3e1fadc1e19b6d8a0396560278aa70c4ea
4
+ data.tar.gz: e133649130e7c960f0e4b1174fe20644111d933f339aabe8256dbfcf39862f10
5
5
  SHA512:
6
- metadata.gz: 4a568a92846ef850d66d04b197cf1124d567c177aa2054dac42b9171528c0f5ae8f7ace8f87197c854392c870dfbb3a639f6d764149ace7ed9ab24d2f20d0080
7
- data.tar.gz: 11a98624829df60763fc27d79f2e3f1de6766080fcd7c4b24d6a4eb5fb9bb442c6ba6345eb99d253083e95913eee8aa6f7b524d67b8ed3195d78960c5d55338b
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
 
@@ -5,5 +5,5 @@
5
5
  #
6
6
  module OpenHAB
7
7
  # @return [String] Version of OpenHAB helper libraries
8
- VERSION = '2.20.3'
8
+ VERSION = '2.21.0'
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: 2.20.3
4
+ version: 2.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian O'Connell