hue-cli 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +31 -0
- data/hue-cli.gemspec +1 -1
- data/lib/hue/cli/processors/light_state_alias.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -168,3 +168,34 @@ All the single light state commands can be applied to all lights.
|
|
168
168
|
```
|
169
169
|
$ hue lights brightness 50%
|
170
170
|
```
|
171
|
+
|
172
|
+
## State aliases.
|
173
|
+
|
174
|
+
The following state aliases exist and can be used on all or single lights.
|
175
|
+
|
176
|
+
```
|
177
|
+
$ hue 1 relax
|
178
|
+
$ hue lights energize
|
179
|
+
$ hue 1 reading
|
180
|
+
$ hue 1 concentrate
|
181
|
+
$ hue 1 red
|
182
|
+
$ hue 1 blue
|
183
|
+
$ hue 1 green
|
184
|
+
$ hue 1 white
|
185
|
+
$ hue 1 pink
|
186
|
+
```
|
187
|
+
|
188
|
+
## State Dump
|
189
|
+
|
190
|
+
Dump the current state of the light, this will display the current state as a JSON hash.
|
191
|
+
This can then be pasted into your local (~/.hue-cli/light_alias.yml) or system (/etc/hue/light_alias.yml) alias files.
|
192
|
+
|
193
|
+
```
|
194
|
+
$ hue 1 dump
|
195
|
+
$ hue lights dump
|
196
|
+
```
|
197
|
+
Paste into your file like this:
|
198
|
+
|
199
|
+
```
|
200
|
+
"yellow": {"on":true,"bri":254,"xy":[0.4823,0.4621],"alert":"none","effect":"none"}
|
201
|
+
```
|
data/hue-cli.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "hue-cli"
|
6
|
-
s.version = '0.1.
|
6
|
+
s.version = '0.1.2'
|
7
7
|
s.authors = ["Birkir A. Barkarson", ""]
|
8
8
|
s.email = ["birkirb@stoicviking.net"]
|
9
9
|
s.homepage = "https://github.com/birkirb/hue-lib"
|
@@ -12,7 +12,7 @@ module Hue
|
|
12
12
|
|
13
13
|
def self.read_alias_files
|
14
14
|
ALIAS_FILE_PATHS.each do |path|
|
15
|
-
file_path = File.join(path, ALIAS_FILE_NAME)
|
15
|
+
file_path = File.expand_path(File.join(path, ALIAS_FILE_NAME))
|
16
16
|
yaml = YAML.load_file(file_path) rescue []
|
17
17
|
yaml.each do |name, state|
|
18
18
|
@@alias_map[name.to_sym] = state
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hue-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-11-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|