switchbot 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +5 -1
- data/CHANGELOG.md +11 -1
- data/lib/switchbot.rb +2 -0
- data/lib/switchbot/client.rb +8 -0
- data/lib/switchbot/device.rb +8 -0
- data/lib/switchbot/humidifier.rb +25 -0
- data/lib/switchbot/light.rb +13 -0
- data/lib/switchbot/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fcabea3a356f50c00679284d145c836a4d1e7733bc0bafd3e7670a09c5fdaf4
|
4
|
+
data.tar.gz: 2e9b2dc531a3ec7a4cdc4b0449097e5924fe9384b7a6d5f0a1486eb710269843
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6381fc08df2212f1e64f63d7729a7680d85024704f7c99d258f2b69e0bcad6580795f2ae81cc9bfaba6bd115f751936858bc70df393abfa6517170a81ffad502
|
7
|
+
data.tar.gz: fed51bbc4bfa4bcfdeb3b28bf5bcc9756a788f5ba71c959b360c500cfb861f2a576516426e82d1c00ac940d2823570bf1ea049e6558f4d0dea92cd32cd16f8ea
|
data/.github/workflows/main.yml
CHANGED
@@ -5,12 +5,16 @@ on: [push,pull_request]
|
|
5
5
|
jobs:
|
6
6
|
build:
|
7
7
|
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: [2.5, 2.6, 2.7]
|
11
|
+
name: Ruby ${{ matrix.ruby }}
|
8
12
|
steps:
|
9
13
|
- uses: actions/checkout@v2
|
10
14
|
- name: Set up Ruby
|
11
15
|
uses: ruby/setup-ruby@v1
|
12
16
|
with:
|
13
|
-
ruby-version:
|
17
|
+
ruby-version: ${{ matrix.ruby }}
|
14
18
|
- name: Run the default task
|
15
19
|
run: |
|
16
20
|
gem install bundler -v 2.2.4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
## Unreleased
|
2
|
-
[full changelog](http://github.com/ytkg/switchbot/compare/v0.
|
2
|
+
[full changelog](http://github.com/ytkg/switchbot/compare/v0.4.0...main)
|
3
|
+
|
4
|
+
## v0.4.0
|
5
|
+
[full changelog](http://github.com/ytkg/switchbot/compare/v0.3.0...v0.4.0)
|
6
|
+
|
7
|
+
* Add Humidifier
|
8
|
+
* https://github.com/ytkg/switchbot/pull/7
|
9
|
+
* Add Light
|
10
|
+
* https://github.com/ytkg/switchbot/pull/6
|
11
|
+
* Add Device#on? and Device#off?
|
12
|
+
* https://github.com/ytkg/switchbot/pull/5
|
3
13
|
|
4
14
|
## v0.3.0
|
5
15
|
[full changelog](http://github.com/ytkg/switchbot/compare/v0.2.0...v0.3.0)
|
data/lib/switchbot.rb
CHANGED
@@ -8,6 +8,8 @@ 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/light'
|
12
|
+
require_relative 'switchbot/humidifier'
|
11
13
|
|
12
14
|
module Switchbot
|
13
15
|
class Error < StandardError; end
|
data/lib/switchbot/client.rb
CHANGED
data/lib/switchbot/device.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Switchbot
|
4
|
+
class Humidifier < Device
|
5
|
+
def mode(value)
|
6
|
+
commands(command: 'setMode', parameter: value.to_s)
|
7
|
+
end
|
8
|
+
|
9
|
+
def auto
|
10
|
+
mode(:auto)
|
11
|
+
end
|
12
|
+
|
13
|
+
def low
|
14
|
+
mode(101)
|
15
|
+
end
|
16
|
+
|
17
|
+
def medium
|
18
|
+
mode(102)
|
19
|
+
end
|
20
|
+
|
21
|
+
def high
|
22
|
+
mode(103)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/switchbot/version.rb
CHANGED
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
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshiki Takagi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -144,6 +144,8 @@ files:
|
|
144
144
|
- lib/switchbot.rb
|
145
145
|
- lib/switchbot/client.rb
|
146
146
|
- lib/switchbot/device.rb
|
147
|
+
- lib/switchbot/humidifier.rb
|
148
|
+
- lib/switchbot/light.rb
|
147
149
|
- lib/switchbot/scene.rb
|
148
150
|
- lib/switchbot/version.rb
|
149
151
|
- switchbot.gemspec
|