Lint fixes

pull/1359/head
Paulus Schoutsen 2016-02-21 13:09:49 -08:00
parent 7c6dcdb082
commit 3d8e9b4261
2 changed files with 3 additions and 4 deletions

View File

@ -156,12 +156,12 @@ class LocationMethods(object):
states = list(entities)
else:
if isinstance(entities, State):
entity_id = entities.entity_id
gr_entity_id = entities.entity_id
else:
entity_id = str(entities)
gr_entity_id = str(entities)
states = [self._hass.states.get(entity_id) for entity_id
in group.expand_entity_ids(self._hass, [entity_id])]
in group.expand_entity_ids(self._hass, [gr_entity_id])]
return loc_helper.closest(latitude, longitude, states)

View File

@ -292,7 +292,6 @@ class TestUtilTemplate(unittest.TestCase):
self.hass,
'{{ distance("123", states.test_object_2) }}'))
def test_closest_function_home_vs_domain(self):
self.hass.states.set('test_domain.object', 'happy', {
'latitude': self.hass.config.latitude + 0.1,