switchbot 0.4.0 → 0.5.0

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: 4fcabea3a356f50c00679284d145c836a4d1e7733bc0bafd3e7670a09c5fdaf4
4
- data.tar.gz: 2e9b2dc531a3ec7a4cdc4b0449097e5924fe9384b7a6d5f0a1486eb710269843
3
+ metadata.gz: 55a05071d2d0711654bb0f7a3a79b971d97e2a66933eb8a34df2b87bf22ca56d
4
+ data.tar.gz: e77ab215552b6e54166a2694807e0025f422141ec5b6e7c82b3417b3e8c90e0c
5
5
  SHA512:
6
- metadata.gz: 6381fc08df2212f1e64f63d7729a7680d85024704f7c99d258f2b69e0bcad6580795f2ae81cc9bfaba6bd115f751936858bc70df393abfa6517170a81ffad502
7
- data.tar.gz: fed51bbc4bfa4bcfdeb3b28bf5bcc9756a788f5ba71c959b360c500cfb861f2a576516426e82d1c00ac940d2823570bf1ea049e6558f4d0dea92cd32cd16f8ea
6
+ metadata.gz: 393417b2f5117397750f6622f142902fce55c5ded9a792b7dd1b6fafc67246ba1ddf61c9b97c687d7ce51f22deb67d1a75804826aab3b6a00e1d5259645f8c74
7
+ data.tar.gz: d69f3d6f8fac1a30845892d1dd1c3745ff33cfb02ac9fe36070731c20f1e5b353966daeb33fba108268cf4c9c2e579cbffc7fb4dc8172ad52ee32be63a5841c6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## Unreleased
2
- [full changelog](http://github.com/ytkg/switchbot/compare/v0.4.0...main)
2
+ [full changelog](http://github.com/ytkg/switchbot/compare/v0.5.0...main)
3
+
4
+ ## v0.5.0
5
+ [full changelog](http://github.com/ytkg/switchbot/compare/v0.4.0...v0.5.0)
6
+
7
+ * Add Bot
8
+ * https://github.com/ytkg/switchbot/pull/9
3
9
 
4
10
  ## v0.4.0
5
11
  [full changelog](http://github.com/ytkg/switchbot/compare/v0.3.0...v0.4.0)
data/lib/switchbot.rb CHANGED
@@ -8,6 +8,7 @@ require_relative 'switchbot/version'
8
8
  require_relative 'switchbot/client'
9
9
  require_relative 'switchbot/device'
10
10
  require_relative 'switchbot/scene'
11
+ require_relative 'switchbot/bot'
11
12
  require_relative 'switchbot/light'
12
13
  require_relative 'switchbot/humidifier'
13
14
 
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Switchbot
4
+ class Bot < Device
5
+ def press
6
+ commands(command: 'press')
7
+ end
8
+ end
9
+ end
@@ -56,6 +56,10 @@ module Switchbot
56
56
  )
57
57
  end
58
58
 
59
+ def bot(device_id)
60
+ Bot.new(client: self, device_id: device_id)
61
+ end
62
+
59
63
  def light(device_id)
60
64
  Light.new(client: self, device_id: device_id)
61
65
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Switchbot
4
- VERSION = '0.4.0'
4
+ VERSION = '0.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switchbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshiki Takagi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-22 00:00:00.000000000 Z
11
+ date: 2021-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -142,6 +142,7 @@ files:
142
142
  - bin/console
143
143
  - bin/setup
144
144
  - lib/switchbot.rb
145
+ - lib/switchbot/bot.rb
145
146
  - lib/switchbot/client.rb
146
147
  - lib/switchbot/device.rb
147
148
  - lib/switchbot/humidifier.rb
@@ -156,7 +157,7 @@ metadata:
156
157
  homepage_uri: https://github.com/ytkg/switchbot
157
158
  source_code_uri: https://github.com/ytkg/switchbot
158
159
  changelog_uri: https://github.com/ytkg/switchbot/blob/main/CHANGELOG.md
159
- post_install_message:
160
+ post_install_message:
160
161
  rdoc_options: []
161
162
  require_paths:
162
163
  - lib
@@ -171,8 +172,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
172
  - !ruby/object:Gem::Version
172
173
  version: '0'
173
174
  requirements: []
174
- rubygems_version: 3.2.4
175
- signing_key:
175
+ rubygems_version: 3.1.6
176
+ signing_key:
176
177
  specification_version: 4
177
178
  summary: SwitchBot API client for Ruby
178
179
  test_files: []