openhab-scripting 3.3.0 → 3.4.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/dsl/things.rb +17 -0
- data/lib/openhab/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: 0c609ff8fbe875f98e26f7286f4a72fdd018b5bd96ec4a7272fb7d7ceacc9657
|
4
|
+
data.tar.gz: f5ca4401987517a11e1ddd0b632f5d0c5380751336175d9a21dba3cc16576308
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b3517f70a227da9d2795fc17b3c9642db3e2ef684bb2611281933d659f5fd14b51f9fcb5472dc2e49c5c051e4debfe560bc064652de41aa172ca0be006689d2
|
7
|
+
data.tar.gz: 1559069e15db427e37c0b13fe03f2cc69cf8aa67d9a943b92453c1c1bd3c192848a713a4f5f8e44c7a57fe1d6bde9a582ca8bbe792a46b5b8e007366cf7457dc
|
data/lib/openhab/dsl/things.rb
CHANGED
@@ -11,6 +11,7 @@ module OpenHAB
|
|
11
11
|
# Support for OpenHAB Things
|
12
12
|
#
|
13
13
|
module Things
|
14
|
+
java_import Java::OrgOpenhabCoreThing::ThingStatus
|
14
15
|
include OpenHAB::Log
|
15
16
|
|
16
17
|
#
|
@@ -25,6 +26,22 @@ module OpenHAB
|
|
25
26
|
define_action_methods
|
26
27
|
end
|
27
28
|
|
29
|
+
#
|
30
|
+
# Defines boolean thing status methods
|
31
|
+
# uninitialized?
|
32
|
+
# initializing?
|
33
|
+
# unknown?
|
34
|
+
# online?
|
35
|
+
# offline?
|
36
|
+
# removing?
|
37
|
+
# removed?
|
38
|
+
#
|
39
|
+
# @return [Boolean] true if the thing status matches the name
|
40
|
+
#
|
41
|
+
ThingStatus.constants.each do |thingstatus|
|
42
|
+
define_method("#{thingstatus.to_s.downcase}?") { status == ThingStatus.value_of(thingstatus) }
|
43
|
+
end
|
44
|
+
|
28
45
|
private
|
29
46
|
|
30
47
|
java_import 'org.openhab.core.automation.annotation.RuleAction'
|
data/lib/openhab/version.rb
CHANGED
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: 3.
|
4
|
+
version: 3.4.0
|
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: 2021-03-
|
11
|
+
date: 2021-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|