Add raid array degraded state binary sensor to freebox sensors (#95242)

Add raid array degraded state binary sensor
This commit is contained in:
Florent Thiery 2023-07-05 15:09:12 +02:00 committed by GitHub
parent c75c79962a
commit bd7057f7b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 296 additions and 36 deletions

View file

@ -11,6 +11,7 @@ from .const import (
DATA_HOME_GET_NODES,
DATA_LAN_GET_HOSTS_LIST,
DATA_STORAGE_GET_DISKS,
DATA_STORAGE_GET_RAIDS,
DATA_SYSTEM_GET_CONFIG,
WIFI_GET_GLOBAL_CONFIG,
)
@ -56,6 +57,7 @@ def mock_router(mock_device_registry_devices):
# sensor
instance.call.get_calls_log = AsyncMock(return_value=DATA_CALL_GET_CALLS_LOG)
instance.storage.get_disks = AsyncMock(return_value=DATA_STORAGE_GET_DISKS)
instance.storage.get_raids = AsyncMock(return_value=DATA_STORAGE_GET_RAIDS)
# home devices
instance.home.get_home_nodes = AsyncMock(return_value=DATA_HOME_GET_NODES)
instance.connection.get_status = AsyncMock(