openhab-scripting 5.47.5 → 5.48.0

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: d22421ade202e53be08b9511bcacdeb16b8242587999d8b9a017f928748318cd
4
- data.tar.gz: 6c4e7e8d938b2c6c62c41a8bb1baf5b10470f73fe371f0e2130fc09bf1c09124
3
+ metadata.gz: ebd253fc1f0f462a281d219b0a102bb6f929e4fc9ae1555c60b8611e2e212487
4
+ data.tar.gz: fc0e411cf1a935d87999ceaaf3750d9ef8d6deee6ebd642c751cd2d1d5085054
5
5
  SHA512:
6
- metadata.gz: d338d71faf5eb7adf46c4b787a3202bcf33c5705541727b40d669331e3d85266464681842439e9a5f1fa79f4b5bd1b527b549c2a266f06b7f90ec8ac31a57a9c
7
- data.tar.gz: 34bd14d2816fc2350fbce61f65d891d10b098f0014d09f113ec0ee85347bfed2ec35255fd836d6894db0b1d283315d5da75d74a1e4bb0f4d4ddcdaffd61b84dc
6
+ metadata.gz: 922a3b755a5258e853e4b3285d67f975d14acc03760adb9f3b66503068053dfa78377a83d60c366f43bac36784df03ff646794905a57883b9b1052b131486f2e
7
+ data.tar.gz: b59b65d06610d7acaa9724b84993ade4464d000d0efe3490b6caf1a4aaaac4082540dfc9a8f5238ab44da85118af8b4e424ce8abb91fd69670070c4c54bd38fd
@@ -15,7 +15,8 @@ module OpenHAB
15
15
  # openHAB Cloud Notification Action}.
16
16
  #
17
17
  # @param msg [String] The message to send.
18
- # @param email [String, nil] The email address to send to. If `nil`, the message will be broadcasted.
18
+ # @param email [String, <String>, nil] The email address(es) to send to. If `nil`, the message will be
19
+ # broadcast.
19
20
  # @param icon [String, Symbol, nil] The icon name
20
21
  # (as described in {https://www.openhab.org/docs/configuration/items.html#icons Items}).
21
22
  # @param tag [String, Symbol, nil] a name to group the type or severity of the notification.
@@ -83,7 +84,21 @@ module OpenHAB
83
84
  end
84
85
 
85
86
  args = []
86
- if email
87
+ if email.is_a?(Enumerable)
88
+ email.each do |e|
89
+ send(msg,
90
+ email: e,
91
+ icon:,
92
+ tag:,
93
+ severity:,
94
+ id:,
95
+ title:,
96
+ on_click:,
97
+ attachment:,
98
+ buttons:)
99
+ end
100
+ return
101
+ elsif email
87
102
  args.push(:send_notification, email)
88
103
  else
89
104
  args.push(:send_broadcast_notification)
@@ -116,7 +131,7 @@ module OpenHAB
116
131
  # - Notifications matching the `id` will be hidden, and
117
132
  # - Notifications matching the `tag` will be hidden, independently from the given tag.
118
133
  #
119
- # @param email [String, nil] The email address to hide notifications for.
134
+ # @param email [String, <String>, nil] The email address(es) to hide notifications for.
120
135
  # If nil, hide broadcast notifications.
121
136
  # @param id [String, nil] hide notifications associated with the given reference ID.
122
137
  # @param tag [String, nil] hide notifications associated with the given tag.
@@ -130,7 +145,12 @@ module OpenHAB
130
145
  raise ArgumentError, "Either id or tag must be provided." unless id || tag
131
146
 
132
147
  args = []
133
- if email
148
+ if email.is_a?(Enumerable)
149
+ email.each do |e|
150
+ hide(email: e, id:, tag:)
151
+ end
152
+ return
153
+ elsif email
134
154
  args.push(email)
135
155
  notification = :notification
136
156
  else
@@ -897,6 +897,7 @@ module OpenHAB
897
897
  # @param [String, Core::Things::Channel, Core::Things::ChannelUID] channels
898
898
  # channels to create triggers for in form of 'binding_id:type_id:thing_id#channel_id'
899
899
  # or 'channel_id' if thing is provided.
900
+ # A string that contains `*` and `?` wildcards are supported since openHAB 5.2.
900
901
  # @param [String, Core::Things::Thing, Core::Things::ThingUID] thing
901
902
  # Thing(s) to create trigger for if not specified with the channel.
902
903
  # @param [String, Array<String>] triggered
@@ -4,6 +4,6 @@ module OpenHAB
4
4
  module DSL
5
5
  # Version of openHAB helper libraries
6
6
  # @return [String]
7
- VERSION = "5.47.5"
7
+ VERSION = "5.48.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.47.5
4
+ version: 5.48.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian O'Connell
@@ -360,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
360
360
  - !ruby/object:Gem::Version
361
361
  version: '0'
362
362
  requirements: []
363
- rubygems_version: 4.0.10
363
+ rubygems_version: 4.0.11
364
364
  specification_version: 4
365
365
  summary: JRuby Helper Libraries for openHAB Scripting
366
366
  test_files: []