Cleanup component track_point_in_utc_time usage (#6330)

This commit is contained in:
Pascal Vizeli authored and Paulus Schoutsen committed 2017-03-01 07:37:48 -08:00
1 parent 30bed8341a
commit 4e96e461f7
5 files changed
+9 -12

No files matched your search

@@ -110,7 +110,7 @@ def setup_scanner(hass, config, see, discovery_info=None):
_LOGGER.info("Discovered Bluetooth LE device %s", address)
see_device(address, devs[address], new_device=True)
track_point_in_utc_time(hass, update_ble, now + interval)
track_point_in_utc_time(hass, update_ble, dt_util.utcnow() + interval)
update_ble(dt_util.utcnow())
@@ -82,7 +82,8 @@ def setup_scanner(hass, config, see, discovery_info=None):
see_device((mac, result))
except bluetooth.BluetoothError:
_LOGGER.exception('Error looking up bluetooth device!')
track_point_in_utc_time(hass, update_bluetooth, now + interval)
track_point_in_utc_time(
hass, update_bluetooth, dt_util.utcnow() + interval)
update_bluetooth(dt_util.utcnow())
@@ -86,7 +86,7 @@ def setup_scanner(hass, config, see, discovery_info=None):
"""Update all the hosts on every interval time."""
for host in hosts:
host.update(see)
track_point_in_utc_time(hass, update, now + interval)
track_point_in_utc_time(hass, update, util.dt.utcnow() + interval)
return True
return update(util.dt.utcnow())