openhab-scripting 5.39.3 → 5.40.1

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: fe8887e94a7426dee0441b26957d6f3f1e1fc38077d524b2e12ed9662cf46df1
4
- data.tar.gz: 89fc920bdbca5c6e6450070eda98ab8d2987797603cb0caa4344b08b424ec949
3
+ metadata.gz: 7d127126eee03f2bf40f89d87519dc43848d7a37fc270cf74f960571b0591a6a
4
+ data.tar.gz: 9798ed530ab09d88cb3698dff764c264cda7e2e0b85b0a57685006f33513203b
5
5
  SHA512:
6
- metadata.gz: f57da9ed57b2ee5395b1699d215d5a49bfb5621604baa5f016400773deef78b8faf8d0b962491ccdefacb758d5971e6fcda443702fe4779e4c331ec898a99767
7
- data.tar.gz: 7ec7bd617e3342900ff1e1d05b58048caa230460d7b57d790807c720cba1a8f46c7a61a57afd78ec98fd4b0cfccb1303123d967b89129fe2259017d02452aa03
6
+ metadata.gz: b9d52444551b2aa6c8a0e0cab506d2aef028e2fe59c983eaf71cac46ba01e8807f1541bc3d790501d555efb2c93f12ec9d3087c43bb72172f43220a37dcd5620
7
+ data.tar.gz: 9c4ec38935c532286b9e19a0325870dbccfbe35b6e52dc0d92a47ff30ce6729ce96afa9fdbe14ccf4b2cf6127c727d2e415fd0c3be9af95cb9c64f5a9055f116
@@ -313,6 +313,8 @@ module OpenHAB
313
313
  # Google Assistant metadata (see {ItemBuilder#ga})
314
314
  # @param homekit [String, Symbol, Array<(String, Hash<String, Object>)>, nil]
315
315
  # Homekit metadata (see {ItemBuilder#homekit})
316
+ # @param matter [String, Symbol, Array<(String, Hash<String, Object>)>, nil]
317
+ # Matter metadata (see {ItemBuilder#matter})
316
318
  # @param metadata [Hash<String, Hash>] Generic metadata (see {ItemBuilder#metadata})
317
319
  # @param state [State] Initial state
318
320
  def initialize(type,
@@ -340,6 +342,7 @@ module OpenHAB
340
342
  alexa: nil,
341
343
  ga: nil, # rubocop:disable Naming/MethodParameterName
342
344
  homekit: nil,
345
+ matter: nil,
343
346
  metadata: nil,
344
347
  state: nil)
345
348
  raise ArgumentError, "`name` cannot be nil" if name.nil?
@@ -389,6 +392,7 @@ module OpenHAB
389
392
  self.alexa(alexa) if alexa
390
393
  self.ga(ga) if ga
391
394
  self.homekit(homekit) if homekit
395
+ self.matter(matter) if matter
392
396
  self.state = state
393
397
 
394
398
  self.group(*group)
@@ -495,7 +499,18 @@ module OpenHAB
495
499
  # @return [void]
496
500
  #
497
501
 
498
- %i[alexa ga homekit].each do |shortcut|
502
+ #
503
+ # @!method matter(value, config = nil)
504
+ # Shortcut for adding Matter metadata
505
+ #
506
+ # @see https://www.openhab.org/addons/bindings/matter/#matter-bridge
507
+ #
508
+ # @param value [String, Symbol] Matter device type or attribute(s)
509
+ # @param config [Hash, nil] Additional Matter configuration
510
+ # @return [void]
511
+ #
512
+
513
+ %i[alexa ga homekit matter].each do |shortcut|
499
514
  define_method(shortcut) do |value = nil, config = nil|
500
515
  value, config = value if value.is_a?(Array)
501
516
  metadata[shortcut] = [value, config]
@@ -36,7 +36,7 @@ module OpenHAB
36
36
  # {TimedCommand#command timed command} is being called.
37
37
  #
38
38
  # @attr [Item] item
39
- # @!visibility private
39
+ # The item that the timed command was sent to.
40
40
  # @attr [Types::Type, Proc] on_expire
41
41
  # @!visibility private
42
42
  # @attr [Core::Timer] timer
@@ -4,6 +4,6 @@ module OpenHAB
4
4
  module DSL
5
5
  # Version of openHAB helper libraries
6
6
  # @return [String]
7
- VERSION = "5.39.3"
7
+ VERSION = "5.40.1"
8
8
  end
9
9
  end
@@ -35,7 +35,8 @@ module OpenHAB
35
35
  def handle_event_internal(type, payload, topic, source)
36
36
  event_factory = @typed_event_factories[type]
37
37
  unless event_factory
38
- logger.debug { "Could not find an Event Factory for the event type '#{type}'." }
38
+ # We can't call the block version because this is a native java logger
39
+ logger.debug("Could not find an Event Factory for the event type '#{type}'.")
39
40
  return
40
41
  end
41
42
 
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.39.3
4
+ version: 5.40.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian O'Connell