-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
[FRONT] Box Humidity in Room #1045
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1045 +/- ##
==========================================
+ Coverage 95.80% 95.86% +0.05%
==========================================
Files 533 536 +3
Lines 7222 7277 +55
==========================================
+ Hits 6919 6976 +57
+ Misses 303 301 -2
Continue to review full report at Codecov.
|
I think we are go to have a generic "sensor box". Adding a box for each kind of sensor, we'll get a very long list of bashboard boxes. |
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.
Code is good enough, didn't test it.
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.
You missed adding your box in the type box list in backend (file server/utils/constant.js
)
const DASHBOARD_BOX_TYPE = {
WEATHER: 'weather',
TEMPERATURE_IN_ROOM: 'temperature-in-room',
HUMIDITY_IN_ROOM: 'humidity-in-room',
USER_PRESENCE: 'user-presence',
CAMERA: 'camera',
DEVICES_IN_ROOM: 'devices-in-room',
};
And I think the backend call with ?expand=humidity
doesn't seem to work.
Now you miss tests on error cases... courage! |
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.
Some code improvment.
server/lib/device/humidity-sensor/humidity-sensor.getHumidityInRoom.js
Outdated
Show resolved
Hide resolved
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.
👍
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.
@Pierre-Gilles You are right , I've commit a better answer |
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.
A few feedbacks
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.
Looks good to me except a small typo :)
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 to me now!
Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
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:
npm test
on both front/server)npm run eslint
on both front/server)npm run prettier
on both front/server)npm run compare-translations
on front)If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website.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.NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
Description of change
New box "Humidity in room" , duplicated from "Temperature in room"
Color is adjusted based on value
Between 45 - 60 % => Green ( Humidity ok )
![image](https://user-images.githubusercontent.com/1528694/105508693-f77a4000-5ccc-11eb-8767-3ee1e5a0368d.png)
Under 45 => Yellow ( too dry )
![image](https://user-images.githubusercontent.com/1528694/105508621-dfa2bc00-5ccc-11eb-9d78-2382cc56afd2.png)
Below 60% => Blue ( too moist )
![image](https://user-images.githubusercontent.com/1528694/105508558-ca2d9200-5ccc-11eb-8773-6dda039910b8.png)