Add reboot and shutdown service to synology_dsm (#42697)

* add reboot and shutdown service to synology_dsm

* apply suggestions

* make _async_setup_services() async

* add comment to make sure unique_id is serial
This commit is contained in:
Michael 2020-11-11 19:06:50 +01:00 committed by GitHub
parent 11ded51ddb
commit dbe89c1e02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 146 additions and 10 deletions

View file

@ -164,8 +164,10 @@ class SynologyDSMFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
if errors:
return await self._show_setup_form(user_input, errors)
# Check if already configured
# unique_id should be serial for services purpose
await self.async_set_unique_id(serial, raise_on_progress=False)
# Check if already configured
self._abort_if_unique_id_configured()
config_data = {