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

Presence sensor datetime in future #1328 #1466

Merged

Conversation

atrovato
Copy link
Contributor

@atrovato atrovato commented Mar 13, 2022

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)
  • [ ] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community for testing before merging.
  • [ ] 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.js) 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

Disallow future time.
Presence sensor future added in demo dashboard.

Fixes #1328

@atrovato atrovato requested a review from Pierre-Gilles March 13, 2022 18:41
@codecov
Copy link

codecov bot commented Mar 13, 2022

Codecov Report

Merging #1466 (46cc1ed) into master (3b6fe44) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1466   +/-   ##
=======================================
  Coverage   96.59%   96.59%           
=======================================
  Files         616      616           
  Lines        8898     8898           
=======================================
  Hits         8595     8595           
  Misses        303      303           

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 3b6fe44...46cc1ed. 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.

Thanks for your PR! :)

The bug happens on any type of sensors, (due to clock difference between the Pi / and the browser of the user), here this PR doesn't fix it for other sensors like motion sensor (impossible to have a motion in the future)

Screenshot 2022-03-18 at 09 21 04

@atrovato
Copy link
Contributor Author

@Pierre-Gilles
Are you sure you tested the right code?

In the following screenshots, you will see on respectivly:

  1. on 2 lines
    1. 3 days ago
    2. 3 days in the future
  2. on 5 lines
    1. 3 days ago
    2. 2 hours ago
    3. now
    4. 2 hours in the future
    5. 3 days in the future

@atrovato atrovato requested a review from Pierre-Gilles March 19, 2022 11:42
@atrovato atrovato force-pushed the fix-presence-time-in-future branch from 798f7c0 to 46cc1ed Compare March 27, 2022 15:57
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.

Indeed, it works! I don't know what didn't work last time !

@Pierre-Gilles Pierre-Gilles merged commit 969d215 into GladysAssistant:master Apr 1, 2022
@relativeci
Copy link

relativeci bot commented Apr 1, 2022

Job #268: Bundle Size — 6.82MB (~+0.01%).

969d215 vs d9915d1

Changed metrics (2/10)
Metric Current Baseline
Cache Invalidation 63.35% 46.42%
Duplicate Code 0.47%(+2.17%) 0.46%
Changed assets by type (1/7)
            Current     Baseline
JS 4.91MB (+0.01%) 4.91MB

View Job #268 report on app.relative-ci.com

@atrovato atrovato deleted the fix-presence-time-in-future branch March 18, 2023 18:24
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.

[BUG] Affichage de la présence "dans quelques secondes"
2 participants