mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Apply late review on Synology DSM (#117060)
keep CONF_TIMEOUT in options to allow downgrades
This commit is contained in:
parent
ad05a542ae
commit
d9ad0c101b
@ -10,7 +10,7 @@ from synology_dsm.api.surveillance_station.camera import SynoCamera
|
|||||||
from synology_dsm.exceptions import SynologyDSMNotLoggedInException
|
from synology_dsm.exceptions import SynologyDSMNotLoggedInException
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_MAC, CONF_TIMEOUT, CONF_VERIFY_SSL
|
from homeassistant.const import CONF_MAC, CONF_VERIFY_SSL
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryNotReady
|
||||||
from homeassistant.helpers import config_validation as cv, device_registry as dr
|
from homeassistant.helpers import config_validation as cv, device_registry as dr
|
||||||
@ -63,10 +63,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
hass.config_entries.async_update_entry(
|
hass.config_entries.async_update_entry(
|
||||||
entry, data={**entry.data, CONF_VERIFY_SSL: DEFAULT_VERIFY_SSL}
|
entry, data={**entry.data, CONF_VERIFY_SSL: DEFAULT_VERIFY_SSL}
|
||||||
)
|
)
|
||||||
if entry.options.get(CONF_TIMEOUT):
|
|
||||||
options = dict(entry.options)
|
|
||||||
options.pop(CONF_TIMEOUT)
|
|
||||||
hass.config_entries.async_update_entry(entry, data=entry.data, options=options)
|
|
||||||
|
|
||||||
# Continue setup
|
# Continue setup
|
||||||
api = SynoApi(hass, entry)
|
api = SynoApi(hass, entry)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user