openhab-scripting 4.44.1 → 4.44.2

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: '0829e9f6bd0cd3d68bef6db15d0e36bbf3b9d5417ce4099830fb7af8b59e35c5'
4
- data.tar.gz: cbfe57842ccbf6ab2fa11d78245033a38ea823b9fa60dcce1cf3a42b14980ef2
3
+ metadata.gz: 5fc4da63132db46b324f609f104065c23d2ca43f9caa44e1736fcaa5aa0cefc1
4
+ data.tar.gz: db4f92843a5c3cba9a11a83c37a832eadd115bdcc75269d2b30800db61bff84b
5
5
  SHA512:
6
- metadata.gz: e7cc9582cfda3af6152beb41d897bca407fd0816d5628bdc9da511c4cc9afc2abf215c7a438b6a9c8b21cb2e38f20bf96ac79908a92a2e50d18818e4e86ab11a
7
- data.tar.gz: 929493b4ad6e943fad845aaad7eb19769991a22915d9fffa9607f8b5cef753f07a651f0e542ad7e0bb005b22a04ed4ec99c1ef27a9527428ec8561b0d6a5987c
6
+ metadata.gz: 62976743367c2cda9c3d88f3fed7701feae81a852226dc93b2c9a41702035ba453e98a21ae3365030a467cc9bd899834eb63d144be2d589fba2716188b7cb2a0
7
+ data.tar.gz: 8f88d0b217d6bcfa7029f601acb551eaf030f63452a99cafba05be514b11ec8b000efbdd9dc3dbc8fed2c98c4e9e19e2e617cdb86749353173679a6ed2118073
@@ -29,7 +29,7 @@ module OpenHAB
29
29
  #
30
30
  # @return [Array]
31
31
  def to_a
32
- group.get_members.to_a
32
+ group.get_members.map { |i| ::OpenHAB::Core::ItemProxy.new(i) }
33
33
  end
34
34
 
35
35
  # Name of the group
@@ -62,6 +62,7 @@ module OpenHAB
62
62
  def initialize(trigger)
63
63
  @trigger = trigger
64
64
  @scheduler = OpenHAB::Core::OSGI.service('org.openhab.core.scheduler.CronScheduler')
65
+ @schedule = nil
65
66
  @expression = trigger.configuration.get('cronExpression')
66
67
  super(trigger)
67
68
  end
@@ -73,7 +74,7 @@ module OpenHAB
73
74
  def setCallback(callback) # rubocop:disable Naming/MethodName
74
75
  synchronized do
75
76
  super(callback)
76
- @scheduler.schedule(self, @expression)
77
+ @schedule = @scheduler.schedule(self, @expression)
77
78
  logger.trace("Scheduled cron job '#{@expression}' for trigger '#{@trigger.id}'.")
78
79
  end
79
80
  end
@@ -102,7 +103,8 @@ module OpenHAB
102
103
  super
103
104
  return unless @schedule
104
105
 
105
- @schedule&.cancel(true)
106
+ @schedule.cancel(true)
107
+ @schedule = nil
106
108
  end
107
109
  logger.trace("cancelled job for trigger '#{@trigger.id}'.")
108
110
  end
@@ -5,5 +5,5 @@
5
5
  #
6
6
  module OpenHAB
7
7
  # @return [String] Version of OpenHAB helper libraries
8
- VERSION = '4.44.1'
8
+ VERSION = '4.44.2'
9
9
  end
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: 4.44.1
4
+ version: 4.44.2
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: 2022-08-20 00:00:00.000000000 Z
11
+ date: 2022-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler