Add raid array degraded state binary sensor to freebox sensors#95242
Conversation
|
Hey there @hacf-fr, @Quentame, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
ff6672d to
251f8b6
Compare
jbouwh
left a comment
There was a problem hiding this comment.
Please add some tests specific for your feature. Not just change testdata.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
afc95b5 to
826c099
Compare
I added a test, please take a look |
96e4da9 to
90f7d8c
Compare
90f7d8c to
28abc6e
Compare
9ac45d9 to
a5ad0f0
Compare
|
For the record, after applying the requested changes, i deployed this as custom_component and i'm having no issues |
466cf80 to
b6183cb
Compare
|
Sorry accidentally rebased your branch. Can you try to add a test for the code that is not covered yet? |
2ffb144 to
b6183cb
Compare
NP, i repushed
What are you referring to, all other sensors that were previously here and had zero tests ? Please be more specific.
Well, i think we should not do that, because a Freebox can have multiple raid arrays, so the name should really include the raid array number. Similar to the disk sensor: https://github.com/home-assistant/core/blob/dev/homeassistant/components/freebox/sensor.py#L191 What do you think ?
Added |
b6183cb to
4e17753
Compare
See CI tests. Since the new code has tests now, we need to test all cases. |
Are you asking me to test more cases on the specific feature i added (e.g. mocking a situation where the raid array gets degraded) or to test the previously existing sensors ? |
4e17753 to
e520386
Compare
Not in this PR, but it would be nice if you did so. BTW the existing modules were listed in These files are in |
jbouwh
left a comment
There was a problem hiding this comment.
Added some suggestions to let the CI tests pass and to test the sensor in a better way
16295b2 to
25b9f5e
Compare
25b9f5e to
e66e43f
Compare
|
It seems you still have to update the docs: https://www.home-assistant.io/integrations/freebox/ Can you open a docs PR, keep in mind you target the PR to the |
|
Proposed change
I use the Freebox router for hosting my HA setup, with a RAID setup (the router has 4 SATA bays with sw RAID functionality and provides virtualization support). Unfortunately their product has no notification feature to report that the array is degraded (i discovered mine was degraded after a power loss event by chance), so i want to add this property to the current Freebox component, e.g. mostly to add a notification.
This PR basically creates one
binary_sensor.freebox_server_r2_raid_array_0_degraded-like boolan sensor entity per RAID array in diagnostics entities.Type of change
Additional information
Checklist
black --fast homeassistant tests)