-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensor support #16
base: master
Are you sure you want to change the base?
Sensor support #16
Conversation
sensorList := map[string]Sensor{} | ||
err = json.Unmarshal(body, &sensorList) | ||
if err != nil { | ||
fmt.Print(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Printing the error is probably not what should be done by default, just returning it should be fine. Maybe include it in the errors.New()
below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
/* | ||
* sensor.go | ||
* GoHue library for Philips Hue | ||
* Copyright (C) 2016 Collin Guarino (Collinux) [email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a new file, so you probably can have your own copyright information here. At least the year should be current.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any change of merging this? I need the sensor temperatures :). |
Builds on #13 but adds support for motion sensors and generic sensors.
Verified against Hue Bridge Daylight Sensor, Hue Dimmer Switch, Hue Tap Switch, Hue Motion Sensor and API-created sensors.