mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-28 11:36:32 +00:00
Update info.py
This commit is contained in:
parent
a59245e6bb
commit
94fba7e175
@ -42,16 +42,8 @@ class InfoCenter(CoreSysAttributes):
|
|||||||
"""Return local CPE."""
|
"""Return local CPE."""
|
||||||
return self._data.get('OperatingSystemCPEName', UNKNOWN)
|
return self._data.get('OperatingSystemCPEName', UNKNOWN)
|
||||||
|
|
||||||
def _check_dbus_hostname(self):
|
|
||||||
"""Check if systemd is connect or raise error."""
|
|
||||||
if not self.sys_dbus.hostname.is_connected:
|
|
||||||
_LOGGER.error("No hostname dbus connection available")
|
|
||||||
raise HostNotSupportedError()
|
|
||||||
|
|
||||||
async def update(self):
|
async def update(self):
|
||||||
"""Update properties over dbus."""
|
"""Update properties over dbus."""
|
||||||
self._check_dbus_hostname()
|
|
||||||
|
|
||||||
_LOGGER.info("Update local host information")
|
_LOGGER.info("Update local host information")
|
||||||
try:
|
try:
|
||||||
self._data = await self.sys_dbus.hostname.get_properties()
|
self._data = await self.sys_dbus.hostname.get_properties()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user