mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 04:20:17 +00:00
Compare commits
5 Commits
llm-python
...
synology_d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbaeacf32a | ||
|
|
f02b5de7b5 | ||
|
|
7e117dfac6 | ||
|
|
c1baec7f28 | ||
|
|
558b7ceb48 |
@@ -12,7 +12,8 @@ from synology_dsm.exceptions import SynologyDSMNotLoggedInException
|
||||
from homeassistant.const import CONF_MAC, CONF_SCAN_INTERVAL, CONF_VERIFY_SSL
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import ConfigEntryNotReady
|
||||
from homeassistant.helpers import device_registry as dr
|
||||
from homeassistant.helpers import config_validation as cv, device_registry as dr
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from .common import SynoApi, raise_config_entry_auth_error
|
||||
from .const import (
|
||||
@@ -36,9 +37,17 @@ from .coordinator import (
|
||||
)
|
||||
from .service import async_setup_services
|
||||
|
||||
CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up the Synology DSM services."""
|
||||
await async_setup_services(hass)
|
||||
return True
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: SynologyDSMConfigEntry) -> bool:
|
||||
"""Set up Synology DSM sensors."""
|
||||
|
||||
@@ -89,9 +98,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: SynologyDSMConfigEntry)
|
||||
details = EXCEPTION_UNKNOWN
|
||||
raise ConfigEntryNotReady(details) from err
|
||||
|
||||
# Services
|
||||
await async_setup_services(hass)
|
||||
|
||||
# For SSDP compat
|
||||
if not entry.data.get(CONF_MAC):
|
||||
hass.config_entries.async_update_entry(
|
||||
|
||||
69
homeassistant/components/synology_dsm/quality_scale.yaml
Normal file
69
homeassistant/components/synology_dsm/quality_scale.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
rules:
|
||||
# Bronze
|
||||
action-setup: done
|
||||
appropriate-polling: done
|
||||
brands: done
|
||||
common-modules: done
|
||||
config-flow-test-coverage: todo
|
||||
config-flow: done
|
||||
dependency-transparency: done
|
||||
docs-actions: todo
|
||||
docs-high-level-description: done
|
||||
docs-installation-instructions: done
|
||||
docs-removal-instructions: done
|
||||
entity-event-setup: done
|
||||
entity-unique-id: done
|
||||
has-entity-name:
|
||||
status: todo
|
||||
comment: button entities missing
|
||||
runtime-data: done
|
||||
test-before-configure: done
|
||||
test-before-setup: done
|
||||
unique-config-entry: done
|
||||
|
||||
# Silver
|
||||
action-exceptions: todo
|
||||
config-entry-unloading: done
|
||||
docs-configuration-parameters: todo
|
||||
docs-installation-parameters: todo
|
||||
entity-unavailable: done
|
||||
integration-owner: done
|
||||
log-when-unavailable:
|
||||
status: done
|
||||
comment: |
|
||||
Handled by coordinator.
|
||||
parallel-updates: todo
|
||||
reauthentication-flow: done
|
||||
test-coverage: todo
|
||||
|
||||
# Gold
|
||||
devices: done
|
||||
diagnostics: done
|
||||
discovery-update-info: done
|
||||
discovery: done
|
||||
docs-data-update: done
|
||||
docs-examples: todo
|
||||
docs-known-limitations: done
|
||||
docs-supported-devices: done
|
||||
docs-supported-functions: done
|
||||
docs-troubleshooting: done
|
||||
docs-use-cases: done
|
||||
dynamic-devices:
|
||||
status: todo
|
||||
comment: cameras and disks can be replaced and removed
|
||||
entity-category: done
|
||||
entity-device-class: done
|
||||
entity-disabled-by-default: done
|
||||
entity-translations: done
|
||||
exception-translations: todo
|
||||
icon-translations: done
|
||||
reconfiguration-flow: todo
|
||||
repair-issues: done
|
||||
stale-devices:
|
||||
status: todo
|
||||
comment: see dynamic-devices
|
||||
|
||||
# Platinum
|
||||
async-dependency: done
|
||||
inject-websession: done
|
||||
strict-typing: done
|
||||
@@ -1,4 +1,15 @@
|
||||
{
|
||||
"common": {
|
||||
"data_description_host": "The hostname or IP address of your Synology NAS.",
|
||||
"data_description_port": "The port number of your Synology NAS WebUI. Leave empty to use the default port.",
|
||||
"data_description_username": "Synology NAS user.",
|
||||
"data_description_password": "Password for the Synology NAS user.",
|
||||
"data_description_ssl": "Use SSL to connect to the Synology NAS.",
|
||||
"data_description_verify_ssl": "Verify the SSL certificate of the Synology NAS. This should be off for self-signed certificates.",
|
||||
"data_description_snap_profile_type": "The quality level of camera snapshots (0:high 1:medium 2:low)",
|
||||
"data_description_backup_share": "Select the shared folder where the automatic Home Assistant backup should be stored.",
|
||||
"data_description_backup_path": "Define the path on the selected shared folder (will automatically be created, if not exist)."
|
||||
},
|
||||
"config": {
|
||||
"flow_title": "{name} ({host})",
|
||||
"step": {
|
||||
@@ -12,13 +23,21 @@
|
||||
"password": "[%key:common::config_flow::data::password%]"
|
||||
},
|
||||
"data_description": {
|
||||
"host": "The hostname or IP address of your Synology NAS."
|
||||
"host": "[%key:component::synology_dsm::common::data_description_host%]",
|
||||
"port": "[%key:component::synology_dsm::common::data_description_port%]",
|
||||
"username": "[%key:component::synology_dsm::common::data_description_username%]",
|
||||
"password": "[%key:component::synology_dsm::common::data_description_password%]",
|
||||
"ssl": "[%key:component::synology_dsm::common::data_description_ssl%]",
|
||||
"verify_ssl": "[%key:component::synology_dsm::common::data_description_verify_ssl%]"
|
||||
}
|
||||
},
|
||||
"2sa": {
|
||||
"title": "Synology DSM: two-step authentication",
|
||||
"data": {
|
||||
"otp_code": "Code"
|
||||
},
|
||||
"data_description": {
|
||||
"otp_code": "A one-time-password generated by the authenticator app."
|
||||
}
|
||||
},
|
||||
"backup_share": {
|
||||
@@ -28,8 +47,8 @@
|
||||
"backup_path": "Path"
|
||||
},
|
||||
"data_description": {
|
||||
"backup_share": "Select the shared folder where the automatic Home Assistant backup should be stored.",
|
||||
"backup_path": "Define the path on the selected shared folder (will automatically be created, if not exist)."
|
||||
"backup_share": "[%key:component::synology_dsm::common::data_description_backup_share%]",
|
||||
"backup_path": "[%key:component::synology_dsm::common::data_description_backup_path%]"
|
||||
}
|
||||
},
|
||||
"link": {
|
||||
@@ -40,6 +59,13 @@
|
||||
"username": "[%key:common::config_flow::data::username%]",
|
||||
"password": "[%key:common::config_flow::data::password%]",
|
||||
"port": "[%key:common::config_flow::data::port%]"
|
||||
},
|
||||
"data_description": {
|
||||
"port": "[%key:component::synology_dsm::common::data_description_port%]",
|
||||
"username": "[%key:component::synology_dsm::common::data_description_username%]",
|
||||
"password": "[%key:component::synology_dsm::common::data_description_password%]",
|
||||
"ssl": "[%key:component::synology_dsm::common::data_description_ssl%]",
|
||||
"verify_ssl": "[%key:component::synology_dsm::common::data_description_verify_ssl%]"
|
||||
}
|
||||
},
|
||||
"reauth_confirm": {
|
||||
@@ -47,6 +73,10 @@
|
||||
"data": {
|
||||
"username": "[%key:common::config_flow::data::username%]",
|
||||
"password": "[%key:common::config_flow::data::password%]"
|
||||
},
|
||||
"data_description": {
|
||||
"username": "[%key:component::synology_dsm::common::data_description_username%]",
|
||||
"password": "[%key:component::synology_dsm::common::data_description_password%]"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -68,13 +98,14 @@
|
||||
"step": {
|
||||
"init": {
|
||||
"data": {
|
||||
"snap_profile_type": "Quality level of camera snapshots (0:high 1:medium 2:low)",
|
||||
"snap_profile_type": "Camera snapshots quality",
|
||||
"backup_share": "[%key:component::synology_dsm::config::step::backup_share::data::backup_share%]",
|
||||
"backup_path": "[%key:component::synology_dsm::config::step::backup_share::data::backup_path%]"
|
||||
},
|
||||
"data_description": {
|
||||
"backup_share": "[%key:component::synology_dsm::config::step::backup_share::data_description::backup_share%]",
|
||||
"backup_path": "[%key:component::synology_dsm::config::step::backup_share::data_description::backup_path%]"
|
||||
"snap_profile_type": "[%key:component::synology_dsm::common::data_description_snap_profile_type%]",
|
||||
"backup_share": "[%key:component::synology_dsm::common::data_description_backup_share%]",
|
||||
"backup_path": "[%key:component::synology_dsm::common::data_description_backup_path%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -219,8 +250,8 @@
|
||||
"backup_path": "[%key:component::synology_dsm::config::step::backup_share::data::backup_path%]"
|
||||
},
|
||||
"data_description": {
|
||||
"backup_share": "[%key:component::synology_dsm::config::step::backup_share::data_description::backup_share%]",
|
||||
"backup_path": "[%key:component::synology_dsm::config::step::backup_share::data_description::backup_path%]"
|
||||
"backup_share": "[%key:component::synology_dsm::common::data_description_backup_share%]",
|
||||
"backup_path": "[%key:component::synology_dsm::common::data_description_backup_path%]"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -968,7 +968,6 @@ INTEGRATIONS_WITHOUT_QUALITY_SCALE_FILE = [
|
||||
"switchmate",
|
||||
"syncthing",
|
||||
"synology_chat",
|
||||
"synology_dsm",
|
||||
"synology_srm",
|
||||
"syslog",
|
||||
"system_bridge",
|
||||
|
||||
Reference in New Issue
Block a user