openhab-scripting 5.34.0 → 5.34.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fce096267797942787402ee95f2c757c3629772b64d061bda1aa3b3c7046fca6
|
4
|
+
data.tar.gz: 9fcaf3ee9bba2e9c18a696de78fbe644cf8e30ca9edc629549d2a74bcadbacac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66a8b0bda211a633650d76306c3fbcd1a78a2a29eda5520f05952387eceb514470ab161f6115c2bfa6a75632a649f7ccfb11c756e44984b524c71d3d4946ab7b
|
7
|
+
data.tar.gz: 9dc227346259c8a2f593972e79bc25d60757ef96b832de2f832a6a8d2c81f35e787c308bce8c12a6f38c9d42124a7372dd1057aecd3a3a8eef42989f6e655db5
|
@@ -5,7 +5,15 @@ module OpenHAB
|
|
5
5
|
module Java
|
6
6
|
Duration = java.time.Duration
|
7
7
|
|
8
|
+
#
|
8
9
|
# Extensions to {java.time.Duration Java Duration}
|
10
|
+
#
|
11
|
+
# Ruby's {Integer} and {Float} classes are extended to allow convenient creation of {Duration} instances.
|
12
|
+
#
|
13
|
+
# @example
|
14
|
+
# 5.seconds # => #<Duration PT5S>
|
15
|
+
# 2.5.hours # => #<Duration PT2H30M>
|
16
|
+
#
|
9
17
|
class Duration
|
10
18
|
include Between
|
11
19
|
# @!parse include TemporalAmount
|
@@ -102,8 +102,7 @@ module OpenHAB
|
|
102
102
|
# during conversion. {ZonedDateTime.now} is assumed if not given.
|
103
103
|
# @return [Instant]
|
104
104
|
def to_instant(context = nil)
|
105
|
-
|
106
|
-
at_start_of_day(zone).to_instant
|
105
|
+
to_zoned_date_time(context).to_instant
|
107
106
|
end
|
108
107
|
end
|
109
108
|
end
|
@@ -112,12 +112,15 @@ module OpenHAB
|
|
112
112
|
context.with(self)
|
113
113
|
end
|
114
114
|
|
115
|
+
#
|
116
|
+
# Converts the LocalTime (in the system timezone) to an Instant (in Zulu time).
|
117
|
+
#
|
115
118
|
# @param [ZonedDateTime, nil] context
|
116
119
|
# A {ZonedDateTime} used to fill in missing fields
|
117
120
|
# during conversion. {ZonedDateTime.now} is assumed if not given.
|
118
121
|
# @return [Instant]
|
122
|
+
#
|
119
123
|
def to_instant(context = nil)
|
120
|
-
context ||= Instant.now.to_zoned_date_time
|
121
124
|
to_zoned_date_time(context).to_instant
|
122
125
|
end
|
123
126
|
end
|
data/lib/openhab/dsl/version.rb
CHANGED
data/lib/openhab/dsl.rb
CHANGED
@@ -157,7 +157,7 @@ module OpenHAB
|
|
157
157
|
# profile(:set_uom) do |event, callback:, configuration:, state:, command:|
|
158
158
|
# unless configuration["unit"]
|
159
159
|
# logger.warn("Unit configuration not provided for set_uom profile")
|
160
|
-
#
|
160
|
+
# next true
|
161
161
|
# end
|
162
162
|
#
|
163
163
|
# case event
|
@@ -187,7 +187,7 @@ module OpenHAB
|
|
187
187
|
# end
|
188
188
|
#
|
189
189
|
# profile(:range_filter, label: "Range Filter", config_description: config_description) do |event, state:, configuration:|
|
190
|
-
#
|
190
|
+
# next true unless event == :state_from_handler
|
191
191
|
#
|
192
192
|
# (configuration["min"]..configuration["max"]).cover?(state)
|
193
193
|
# 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.34.
|
4
|
+
version: 5.34.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian O'Connell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
- Jimmy Tanagra
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -487,7 +487,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
487
487
|
- !ruby/object:Gem::Version
|
488
488
|
version: '0'
|
489
489
|
requirements: []
|
490
|
-
rubygems_version: 3.6.
|
490
|
+
rubygems_version: 3.6.3
|
491
491
|
specification_version: 4
|
492
492
|
summary: JRuby Helper Libraries for openHAB Scripting
|
493
493
|
test_files: []
|