Skip to content
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

[philips-hue] Answer message when no lights found in a room #965

Merged
merged 6 commits into from
Nov 23, 2020

Conversation

cicoub13
Copy link
Contributor

Closes #959

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

  • If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)
  • If you are adding a new features/services, did you run integration comparator? (npm run compare-translations on front) => Not applicable
  • If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code) => Not applicable
  • If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website. => Not applicable
  • Did you add fake requests data for the demo mode (front/src/config/demo.json) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com. => Not applicable

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

Fix issue #959 when asking to turn on/off lights in a room with no lights

@cicoub13
Copy link
Contributor Author

Capture d’écran 2020-11-18 à 19 54 04

@cicoub13 cicoub13 changed the title fix: Answer message when no lights found in a room [philips-hue] Answer message when no lights found in a room Nov 18, 2020
@codecov
Copy link

codecov bot commented Nov 18, 2020

Codecov Report

Merging #965 (9434840) into master (fa90990) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #965   +/-   ##
=======================================
  Coverage   94.39%   94.40%           
=======================================
  Files         481      481           
  Lines        6355     6362    +7     
=======================================
+ Hits         5999     6006    +7     
  Misses        356      356           
Impacted Files Coverage Δ
server/lib/device/light/light.command.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa90990...9434840. Read the comment docs.

Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi !

Thanks for your PR, it's great and tests are great :)

I added 2 little feedbacks on it.

server/config/brain/light/answers.fr.json Show resolved Hide resolved
server/lib/device/light/light.command.js Outdated Show resolved Hide resolved
- Do not check number of devices but number of devices with binary features
Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your changes!

There is still a little side-effect of your implementation, see my comments.

Except that everything is perfect :)

server/lib/device/light/light.command.js Outdated Show resolved Hide resolved
Copy link
Contributor

@atrovato atrovato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code approved, but not tested locally.

Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, good for me !

@Pierre-Gilles Pierre-Gilles merged commit aee7c79 into GladysAssistant:master Nov 23, 2020
R6n0 pushed a commit to R6n0/Gladys that referenced this pull request Dec 2, 2020
…s been found (GladysAssistant#965)

* fix: Answer message when no lights found in a room

Closes GladysAssistant#959

* fix: Take in account PR feedbacks

- Do not check number of devices but number of devices with binary features

* fix(philips-hue): Use case where exception is thrown and no lights

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
@cicoub13 cicoub13 deleted the fix-959 branch May 15, 2021 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NLP: When asking to turn on the light, and no lights was found, Gladys replies that the light was turned on
3 participants