lightwaverf 0.2.1 → 0.2.2

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.
Files changed (3) hide show
  1. data/bin/lightwaverf +1 -1
  2. data/lib/lightwaverf.rb +3 -0
  3. metadata +2 -2
data/bin/lightwaverf CHANGED
@@ -10,5 +10,5 @@ case ARGV[0]
10
10
  when 'timer'
11
11
  puts LightWaveRF.new.timer ARGV[1], ARGV[2]
12
12
  else
13
- LightWaveRF.new.send ARGV[0], ARGV[1], ARGV[2], ARGV[4]
13
+ LightWaveRF.new.send ARGV[0], ARGV[1], ARGV[2], ARGV[3]
14
14
  end
data/lib/lightwaverf.rb CHANGED
@@ -78,6 +78,9 @@ class LightWaveRF
78
78
  # Arguments:
79
79
  # state: (String)
80
80
  def self.get_state state = 'on'
81
+ if /^\d+$/.match state.to_s
82
+ state = state.to_i
83
+ end
81
84
  case state
82
85
  when 'off'
83
86
  state = 'F0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lightwaverf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-01 00:00:00.000000000 Z
12
+ date: 2013-02-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Interact with lightwaverf wifi link from code or the command line. Control
15
15
  your lights, heating, sockets etc. Also set up timers using a google calendar and