8000 Xiaomi by Danielhiversen · Pull Request #9126 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Xiaomi #9126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 25, 2017
Merged

Xiaomi #9126

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions homeassistant/components/xiaomi.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def setup(hass, config):
interface)

_LOGGER.debug("Expecting %s gateways", len(gateways))
for _ in range(discovery_retry):
_LOGGER.info('Discovering Xiaomi Gateways (Try %s)', _ + 1)
for k in range(discovery_retry):
_LOGGER.info('Discovering Xiaomi Gateways (Try %s)', k + 1)
hass.data[PY_XIAOMI_GATEWAY].discover_gateways()
if len(hass.data[PY_XIAOMI_GATEWAY].gateways) >= len(gateways):
break
Expand Down Expand Up @@ -152,8 +152,8 @@ def __init__(self, device, name, xiaomi_hub):
self._name = '{}_{}'.format(name, self._sid)
self._write_to_hub = xiaomi_hub.write_to_hub
self._get_from_hub = xiaomi_hub.get_from_hub
xiaomi_hub.callbacks[self._sid].append(self.push_data)
self._device_state_attributes = {}
xiaomi_hub.callbacks[self._sid].append(self.push_data)
self.parse_data(device['data'])
self.parse_voltage(device['data'])

Expand All @@ -164,7 +164,7 @@ def name(self):

@property
def should_poll(self):
"""Poll update device status."""
"""No polling needed."""
return False

@property
Expand Down
0