aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-02-21 18:24:04 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-02-21 18:24:04 -0500
commitf617292031b38874607f4736298ec4e9a15bf7b1 (patch)
tree9b2c915aa4485201dc98fdebd71716145c97f4de
parentf4464a1321b3149db7eab3d21cd4155bbf5e7fbc (diff)
Fixed index issue where GetAllLights would not get index 0.
-rw-r--r--bridge.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/bridge.go b/bridge.go
index a9b8181..9dd7d04 100644
--- a/bridge.go
+++ b/bridge.go
@@ -221,7 +221,7 @@ func (bridge *Bridge) GetAllLights() ([]Light, error) {
// Loop through all light indicies to see if they exist
// and parse their values. Supports 100 lights.
var lights []Light
- for index := 1; index < 101; index++ {
+ for index := 0; index < 101; index++ {
light, err := bridge.GetLightByIndex(index)
if err != nil {
break // Final light index reached, index does not exist.