alexa_hue 1.1.10 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alexa_hue/custom_slots.rb +10 -1
- data/lib/alexa_hue/hue/request_body.rb +1 -1
- data/lib/alexa_hue/version.rb +1 -1
- data/skills_config/custom_slots.txt +0 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffe5a6694504cd27f32f7017636a1302bb8d9cf7
|
4
|
+
data.tar.gz: c2c640fd079fbe5a2dd2d017512d291a61b0294c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93bf492cbea63fbb6c8440a3b6c2ea07a57058a0160cfd204559b089eae0157c3c1177fae6e57865fb2ce36a7532255487e3f0e3e1f554fc9bf875a0f24485df
|
7
|
+
data.tar.gz: 9dc3e8a3a3d474de29be842c6ce465c3b6930e48a482f67b2f166347b4546390b75610a93161df71cac4fa05c8582a6340982fd96faafdf118bcfce69472b65f
|
@@ -1,5 +1,14 @@
|
|
1
|
+
require 'alexa_hue/hue/client'
|
1
2
|
module Hue
|
2
3
|
def self.custom_slots
|
3
|
-
|
4
|
+
client = Hue::Client.new
|
5
|
+
slots = "LIGHTS"
|
6
|
+
client.instance_variable_get(("@lights").intern).keys.each {|x| slots << "\n#{x}"}
|
7
|
+
client.instance_variable_get(("@groups").intern).keys.each {|x| slots << "\n#{x}"}
|
8
|
+
slots << "\n\nSCENE"
|
9
|
+
client.instance_variable_get(("@scenes").intern).keys.each {|x| slots << "\n#{x}"}
|
10
|
+
slots << "\n"
|
11
|
+
slots << File.read(File.expand_path('../../../skills_config/custom_slots.txt', __FILE__))
|
12
|
+
slots
|
4
13
|
end
|
5
14
|
end
|
@@ -21,7 +21,7 @@ module Hue
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def to_hash(without_scene:false)
|
24
|
-
hash = {hue: @hue, ct: @ct, bri: @bri, sat: @sat, transitiontime: @transitiontime, on: @on, effect: @effect, alert: alert}
|
24
|
+
hash = {hue: @hue, ct: @ct, bri: @bri, sat: @sat, transitiontime: @transitiontime, on: @on, effect: @effect, alert: @alert}
|
25
25
|
hash.merge!(scene: @scene) if without_scene
|
26
26
|
return hash
|
27
27
|
end
|
data/lib/alexa_hue/version.rb
CHANGED
@@ -1,9 +1,3 @@
|
|
1
|
-
LIGHTS
|
2
|
-
bedroom lights
|
3
|
-
fireplace lights
|
4
|
-
floor light
|
5
|
-
overhead light
|
6
|
-
|
7
1
|
ATTRIBUTE
|
8
2
|
Saturation
|
9
3
|
Brightness
|
@@ -35,12 +29,6 @@ eight
|
|
35
29
|
nine
|
36
30
|
ten
|
37
31
|
|
38
|
-
SCENE
|
39
|
-
morning
|
40
|
-
evening
|
41
|
-
dinner
|
42
|
-
afternoon
|
43
|
-
|
44
32
|
STATE
|
45
33
|
on
|
46
34
|
off
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alexa_hue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Lucas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|