-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[hue] Added channel to enable / disable a motion sensor #8721
[hue] Added channel to enable / disable a motion sensor #8721
Conversation
case CHANNEL_ENABLED: | ||
configUpdate.setOn(OnOffType.ON.equals(command)); | ||
break; | ||
} |
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.
For other channels, I think you have to call the parent class (which handle few other channels).
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.
On the first glance, yes, but currently the presence sensor only has read-only channels thus no command has to be handled except this one.
break; | ||
} | ||
|
||
hueBridge.updateSensorConfig(sensor, configUpdate); |
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.
It should be moved in your switch case.
@cweitkamp : can you please have a look to the code of the parent class, I think we have a useless test at this line: |
@lolodomo Thanks for your comments. I saw the superfluous check and thought about an improvement too. Problem is that |
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.
LGTM
Looks like you need to run spotless. |
Signed-off-by: Christoph Weitkamp <[email protected]>
Signed-off-by: Christoph Weitkamp <[email protected]>
e074c52
to
9137064
Compare
* Added channel to activate/deactivate a motion sensor * Applied spotless Signed-off-by: Christoph Weitkamp <[email protected]>
* Added channel to activate/deactivate a motion sensor * Applied spotless Signed-off-by: Christoph Weitkamp <[email protected]>
Added channel to enable / disable a motion sensor
Closes #8389
Signed-off-by: Christoph Weitkamp [email protected]