alexa_hue 1.1.10 → 1.2.0

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
  SHA1:
3
- metadata.gz: b1e651f32e10079e88cb2c5cdaf964db2794716e
4
- data.tar.gz: 02362df73c6f82fa546239426a1445790918fb66
3
+ metadata.gz: ffe5a6694504cd27f32f7017636a1302bb8d9cf7
4
+ data.tar.gz: c2c640fd079fbe5a2dd2d017512d291a61b0294c
5
5
  SHA512:
6
- metadata.gz: 61011accd70997d59ae4d3ca114107525b15a918194dc0f5bcf42cfca92793c7d06d1953dacd6ef7c7bcd7acd263a4b82d8c7170d11e195718690da82f14e8f9
7
- data.tar.gz: 53ace5796d690a500fcebcd477743bf207e9bfe5414417dea0d5a6e6293a8d82eabcc2c678c49c0417116379ff5ab75423719137014f2c2b97630cd7ab50a681
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
- File.read(File.expand_path('../../../skills_config/custom_slots.txt', __FILE__))
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
@@ -1,4 +1,4 @@
1
1
  module Hue
2
- VERSION = "1.1.10"
2
+ VERSION = "1.2.0"
3
3
  end
4
4
 
@@ -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.1.10
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-17 00:00:00.000000000 Z
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json