GladysAssistant / Gladys

A privacy-first, open-source home assistant
https://gladysassistant.com
Apache License 2.0
2.67k stars 282 forks source link

feat(boxs): Add Motion Sensor Device #2028

Closed cicoub13 closed 8 months ago

cicoub13 commented 8 months ago

This PR is adding a Motion Sensor Device row to display "Motion detected" when the device is sending a 1 value and the last time seen when it's not

Detection No detection
![image](https://github.com/GladysAssistant/Gladys/assets/1773153/9ac6483c-80a0-4d1c-8343-cc8f4885d677) ![image](https://github.com/GladysAssistant/Gladys/assets/1773153/ba38050e-bb0a-4f12-8131-1486c92c291e)

You can follow discussion here in the community https://community.gladysassistant.com/t/dashboard-etat-detecteur-de-mouvement/8508/14?u=cicoub13

This could be extended later to Presence Sensor (with a different text like "Presence detected")

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.32%. Comparing base (185fe8a) to head (a186c34).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2028 +/- ## ======================================= Coverage 98.32% 98.32% ======================================= Files 836 836 Lines 13269 13269 ======================================= Hits 13047 13047 Misses 222 222 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

relativeci[bot] commented 8 months ago

Job #2393: Bundle Size — 9.83MiB (+0.01%).

a186c34(current) vs 185fe8a master#2390(baseline)

[!WARNING] Bundle contains 3 duplicate packages – View duplicate packages

Bundle metrics  Change 3 changes Regression 1 regression
                 Current
Job #2393
     Baseline
Job #2390
Regression  Initial JS 5.34MiB(~+0.01%) 5.34MiB
No change  Initial CSS 303.16KiB 303.16KiB
Change  Cache Invalidation 63% 0%
No change  Chunks 51 51
No change  Assets 165 165
Change  Modules 1455(+0.07%) 1454
No change  Duplicate Modules 20 20
No change  Duplicate Code 0.8% 0.8%
No change  Packages 124 124
No change  Duplicate Packages 3 3

Bundle size by type  Change 1 change Regression 1 regression
|            |       Current
[Job #2393](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2393-glOJr50Cb4T8T21Cjxhg?utm_source=github&utm_medium=pr-report "View job report") |      Baseline
[Job #2390](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2390-LUGnxp8DQHJepqDwNbWk?utm_source=github&utm_medium=pr-report "View baseline job report") | |:--|--:|--:| | Regression  [JS](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2393-glOJr50Cb4T8T21Cjxhg/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-1_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View JS assets") | `7.03MiB` (`+0.01%`) | `7.03MiB` | | Not changed  [IMG](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2393-glOJr50Cb4T8T21Cjxhg/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-1_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View IMG assets") | `2.37MiB` | `2.37MiB` | | Not changed  [CSS](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2393-glOJr50Cb4T8T21Cjxhg/assets?ba=%7B%22filters%22%3A%22ft.CSS-1_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-0%22%7D "View CSS assets") | `319.67KiB` | `319.67KiB` | | Not changed  [Fonts](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2393-glOJr50Cb4T8T21Cjxhg/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-1_ft.HTML-0_ft.OTHER-0%22%7D "View Fonts assets") | `93.55KiB` | `93.55KiB` | | Not changed  [Other](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2393-glOJr50Cb4T8T21Cjxhg/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-0_ft.OTHER-1%22%7D "View Other assets") | `16.93KiB` | `16.93KiB` | | Not changed  [HTML](https://app.relative-ci.com/projects/PUROh8FAVkDKmpUrqr4u/jobs/2393-glOJr50Cb4T8T21Cjxhg/assets?ba=%7B%22filters%22%3A%22ft.CSS-0_ft.JS-0_ft.IMG-0_ft.MEDIA-0_ft.FONT-0_ft.HTML-1_ft.OTHER-0%22%7D "View HTML assets") | `13.58KiB` | `13.58KiB` |

View job #2393 reportView cicoub13:feat-motion-detection-b... branch activityView project dashboard