From 66c6f9cdd66517cb49cd0e30c38c46d09f7d2d35 Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Sat, 17 Mar 2018 11:51:40 +0100 Subject: [PATCH] Unused xiaomi miio sensor method removed (#13281) * Unused method removed. * remove unused import --- homeassistant/components/sensor/xiaomi_miio.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/homeassistant/components/sensor/xiaomi_miio.py b/homeassistant/components/sensor/xiaomi_miio.py index af7534d9112..cb172735ac4 100644 --- a/homeassistant/components/sensor/xiaomi_miio.py +++ b/homeassistant/components/sensor/xiaomi_miio.py @@ -4,7 +4,6 @@ Support for Xiaomi Mi Air Quality Monitor (PM2.5). For more details about this platform, please refer to the documentation https://home-assistant.io/components/sensor.xiaomi_miio/ """ -from functools import partial import logging import voluptuous as vol @@ -131,21 +130,6 @@ class XiaomiAirQualityMonitor(Entity): """Return the state attributes of the device.""" return self._state_attrs - async def _try_command(self, mask_error, func, *args, **kwargs): - """Call a device command handling error messages.""" - from miio import DeviceException - try: - result = await self.hass.async_add_job( - partial(func, *args, **kwargs)) - - _LOGGER.debug("Response received from miio device: %s", result) - - return result == SUCCESS - except DeviceException as exc: - _LOGGER.error(mask_error, exc) - self._available = False - return False - async def async_update(self): """Fetch state from the miio device.""" from miio import DeviceException