Closed bboehmke closed 5 years ago
Thanks for contributing. Changes looks good 👏
Hey, I have a question about this - I forked the repo and then tried to go test
, but it fails due to missing a sensor property, which you've included.
I can see all of the other properties populate, but not that one. Any idea why?
/Users/barrebre/go/src/github.com/barrebre/huego/sensor_test.go:25:32: sensor.UniqueID undefined (type huego.Sensor has no field or method UniqueID)
/Users/barrebre/go/src/github.com/barrebre/huego/sensor_test.go:45:31: sensor.UniqueID undefined (type *huego.Sensor has no field or method UniqueID)
/Users/barrebre/go/src/github.com/barrebre/huego/sensor_test.go:93:32: sensor.UniqueID undefined (type *huego.Sensor has no field or method UniqueID)
@barrebre I think it's because the tests are in a different package huego_test
and therefor include "github.com/amimof/huego"
. It's kinda weird that way and I'm going to change it so it's easier to fork and contribute.
@barrebre Maybe I can help:
I suppose you cloned (or go get) the module inside the GOPATH. If this is the case the Go Modules are disabled by default (see https://github.com/golang/go/wiki/Modules#how-to-define-a-modul).
If you clone this repository outside of the GOPATH the test should work as expected.
Added missing unique ID of sensors.
See https://developers.meethue.com/develop/hue-api/5-sensors-api/