openhab-scripting 5.24.2 → 5.25.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/core/items/group_item.rb +20 -0
- data/lib/openhab/core/things/thing.rb +5 -0
- data/lib/openhab/dsl/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dd540981ebe38c1c9caa47519ef602482ae3f3f9fb9bdfce0c9f7f82e8354e7
|
4
|
+
data.tar.gz: f41c35b263ae2806eb7bd0e5c921cf77992c772165b3dd772515f6208682b20e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15c663deb2da069fb03179638b89d7df1068c5dd1f7b16312dce90c81d97a8b949c6b60208855ea2b7c4ec6210aa2dca57ec7a29dc8ddc5abb3cc4ffe7ac4572
|
7
|
+
data.tar.gz: 67043ce7f88d1c5cacb92f2cb172b7faaeb376d0ad2258901b603e61241e70732f41f5c2abcc05880daac2446fe9031f298112910c29bb69ffbdf81e18c760bc
|
@@ -83,6 +83,26 @@ module OpenHAB
|
|
83
83
|
@group = group_item
|
84
84
|
end
|
85
85
|
|
86
|
+
#
|
87
|
+
# Adds a member to the group
|
88
|
+
#
|
89
|
+
# @param [Item, String] member The item to add to the group
|
90
|
+
# @return [Members] self
|
91
|
+
#
|
92
|
+
def add(member)
|
93
|
+
if member.is_a?(String)
|
94
|
+
member = items[member]
|
95
|
+
raise ArgumentError, "Item not found: #{member}" if member.nil?
|
96
|
+
end
|
97
|
+
|
98
|
+
member = member.__getobj__ if member.is_a?(Proxy)
|
99
|
+
raise ArgumentError, "Member must be an Item" unless member.is_a?(Item)
|
100
|
+
|
101
|
+
group.add_member(member)
|
102
|
+
self
|
103
|
+
end
|
104
|
+
alias_method :<<, :add
|
105
|
+
|
86
106
|
# Explicit conversion to Array
|
87
107
|
#
|
88
108
|
# @return [Array]
|
@@ -171,6 +171,11 @@ module OpenHAB
|
|
171
171
|
bridge_uid && EntityLookup.lookup_thing(bridge_uid)
|
172
172
|
end
|
173
173
|
|
174
|
+
# @return [true,false] true if this Thing is a bridge
|
175
|
+
def bridge?
|
176
|
+
is_a?(org.openhab.core.thing.Bridge)
|
177
|
+
end
|
178
|
+
|
174
179
|
# @return [String]
|
175
180
|
def inspect
|
176
181
|
r = "#<OpenHAB::Core::Things::Thing #{uid}"
|
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.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian O'Connell
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-08-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -490,7 +490,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
490
490
|
- !ruby/object:Gem::Version
|
491
491
|
version: '0'
|
492
492
|
requirements: []
|
493
|
-
rubygems_version: 3.5.
|
493
|
+
rubygems_version: 3.5.17
|
494
494
|
signing_key:
|
495
495
|
specification_version: 4
|
496
496
|
summary: JRuby Helper Libraries for openHAB Scripting
|