mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Bump Synology DSM to 0.9.0 (#39819)
This commit is contained in:
parent
748e2696dc
commit
95a33ba894
@ -420,7 +420,7 @@ homeassistant/components/switchbot/* @danielhiversen
|
|||||||
homeassistant/components/switcher_kis/* @tomerfi
|
homeassistant/components/switcher_kis/* @tomerfi
|
||||||
homeassistant/components/switchmate/* @danielhiversen
|
homeassistant/components/switchmate/* @danielhiversen
|
||||||
homeassistant/components/syncthru/* @nielstron
|
homeassistant/components/syncthru/* @nielstron
|
||||||
homeassistant/components/synology_dsm/* @ProtoThis @Quentame
|
homeassistant/components/synology_dsm/* @hacf-fr @Quentame
|
||||||
homeassistant/components/synology_srm/* @aerialls
|
homeassistant/components/synology_srm/* @aerialls
|
||||||
homeassistant/components/syslog/* @fabaff
|
homeassistant/components/syslog/* @fabaff
|
||||||
homeassistant/components/tado/* @michaelarnauts @bdraco
|
homeassistant/components/tado/* @michaelarnauts @bdraco
|
||||||
|
@ -311,7 +311,9 @@ class SynoApi:
|
|||||||
def _fetch_device_configuration(self):
|
def _fetch_device_configuration(self):
|
||||||
"""Fetch initial device config."""
|
"""Fetch initial device config."""
|
||||||
self.information = self.dsm.information
|
self.information = self.dsm.information
|
||||||
|
self.information.update()
|
||||||
self.network = self.dsm.network
|
self.network = self.dsm.network
|
||||||
|
self.network.update()
|
||||||
|
|
||||||
if self._with_security:
|
if self._with_security:
|
||||||
self.security = self.dsm.security
|
self.security = self.dsm.security
|
||||||
@ -444,7 +446,7 @@ class SynologyDSMDeviceEntity(SynologyDSMEntity):
|
|||||||
self._device_type = None
|
self._device_type = None
|
||||||
|
|
||||||
if "volume" in entity_type:
|
if "volume" in entity_type:
|
||||||
volume = self._api.storage._get_volume(self._device_id)
|
volume = self._api.storage.get_volume(self._device_id)
|
||||||
# Volume does not have a name
|
# Volume does not have a name
|
||||||
self._device_name = volume["id"].replace("_", " ").capitalize()
|
self._device_name = volume["id"].replace("_", " ").capitalize()
|
||||||
self._device_manufacturer = "Synology"
|
self._device_manufacturer = "Synology"
|
||||||
@ -457,7 +459,7 @@ class SynologyDSMDeviceEntity(SynologyDSMEntity):
|
|||||||
.replace("shr", "SHR")
|
.replace("shr", "SHR")
|
||||||
)
|
)
|
||||||
elif "disk" in entity_type:
|
elif "disk" in entity_type:
|
||||||
disk = self._api.storage._get_disk(self._device_id)
|
disk = self._api.storage.get_disk(self._device_id)
|
||||||
self._device_name = disk["name"]
|
self._device_name = disk["name"]
|
||||||
self._device_manufacturer = disk["vendor"]
|
self._device_manufacturer = disk["vendor"]
|
||||||
self._device_model = disk["model"].strip()
|
self._device_model = disk["model"].strip()
|
||||||
|
@ -260,14 +260,15 @@ def _login_and_fetch_syno_info(api, otp_code):
|
|||||||
"""Login to the NAS and fetch basic data."""
|
"""Login to the NAS and fetch basic data."""
|
||||||
# These do i/o
|
# These do i/o
|
||||||
api.login(otp_code)
|
api.login(otp_code)
|
||||||
utilisation = api.utilisation
|
api.utilisation.update()
|
||||||
storage = api.storage
|
api.storage.update()
|
||||||
|
api.network.update()
|
||||||
|
|
||||||
if (
|
if (
|
||||||
not api.information.serial
|
not api.information.serial
|
||||||
or utilisation.cpu_user_load is None
|
or api.utilisation.cpu_user_load is None
|
||||||
or not storage.disks_ids
|
or not api.storage.disks_ids
|
||||||
or not storage.volumes_ids
|
or not api.storage.volumes_ids
|
||||||
or not api.network.macs
|
or not api.network.macs
|
||||||
):
|
):
|
||||||
raise InvalidData
|
raise InvalidData
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"domain": "synology_dsm",
|
"domain": "synology_dsm",
|
||||||
"name": "Synology DSM",
|
"name": "Synology DSM",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/synology_dsm",
|
"documentation": "https://www.home-assistant.io/integrations/synology_dsm",
|
||||||
"requirements": ["python-synology==0.8.2"],
|
"requirements": ["python-synology==0.9.0"],
|
||||||
"codeowners": ["@ProtoThis", "@Quentame"],
|
"codeowners": ["@hacf-fr", "@Quentame"],
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"ssdp": [
|
"ssdp": [
|
||||||
{
|
{
|
||||||
|
@ -1761,7 +1761,7 @@ python-sochain-api==0.0.2
|
|||||||
python-songpal==0.12
|
python-songpal==0.12
|
||||||
|
|
||||||
# homeassistant.components.synology_dsm
|
# homeassistant.components.synology_dsm
|
||||||
python-synology==0.8.2
|
python-synology==0.9.0
|
||||||
|
|
||||||
# homeassistant.components.tado
|
# homeassistant.components.tado
|
||||||
python-tado==0.8.1
|
python-tado==0.8.1
|
||||||
|
@ -830,7 +830,7 @@ python-openzwave-mqtt==1.0.5
|
|||||||
python-songpal==0.12
|
python-songpal==0.12
|
||||||
|
|
||||||
# homeassistant.components.synology_dsm
|
# homeassistant.components.synology_dsm
|
||||||
python-synology==0.8.2
|
python-synology==0.9.0
|
||||||
|
|
||||||
# homeassistant.components.tado
|
# homeassistant.components.tado
|
||||||
python-tado==0.8.1
|
python-tado==0.8.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user