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 +4 -4
- data/lib/openhab/core/actions/notification.rb +24 -4
- data/lib/openhab/dsl/rules/builder.rb +1 -0
- data/lib/openhab/dsl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ebd253fc1f0f462a281d219b0a102bb6f929e4fc9ae1555c60b8611e2e212487
|
|
4
|
+
data.tar.gz: fc0e411cf1a935d87999ceaaf3750d9ef8d6deee6ebd642c751cd2d1d5085054
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
data/lib/openhab/dsl/version.rb
CHANGED
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.
|
|
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.
|
|
363
|
+
rubygems_version: 4.0.11
|
|
364
364
|
specification_version: 4
|
|
365
365
|
summary: JRuby Helper Libraries for openHAB Scripting
|
|
366
366
|
test_files: []
|