mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-22 16:46:29 +00:00
Fix attributes
This commit is contained in:
parent
70ac395232
commit
9041eb9e9a
@ -101,12 +101,13 @@ class DBus:
|
|||||||
# Parse and return data
|
# Parse and return data
|
||||||
return self._gvariant(data)
|
return self._gvariant(data)
|
||||||
|
|
||||||
def get_properties(self, interface):
|
async def get_properties(self, interface):
|
||||||
"""Read all properties from interface.
|
"""Read all properties from interface."""
|
||||||
|
try:
|
||||||
Return a coroutine.
|
return await self.call_dbus(DBUS_METHOD_GETALL, interface)[0]
|
||||||
"""
|
except IndexError:
|
||||||
return self.call_dbus(DBUS_METHOD_GETALL, interface)
|
_LOGGER.error("No attributes returned for %s", interface)
|
||||||
|
raise DBusFatalError from None
|
||||||
|
|
||||||
async def _send(self, command):
|
async def _send(self, command):
|
||||||
"""Send command over dbus."""
|
"""Send command over dbus."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user