Skip to content

Commit

Permalink
Unused xiaomi miio sensor method removed (#13281)
Browse files Browse the repository at this point in the history
* Unused method removed.

* remove unused import
  • Loading branch information
syssi authored and MartinHjelmare committed Mar 17, 2018
1 parent 5a9013c commit 66c6f9c
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions homeassistant/components/sensor/xiaomi_miio.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
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
Expand Down Expand Up @@ -131,21 +130,6 @@ def device_state_attributes(self):
"""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
Expand Down

0 comments on commit 66c6f9c

Please sign in to comment.