'Test closest function home vs group entity id.'

def test_closest_function_home_vs_group_entity_id(self):

    self.hass.states.set('test_domain.object', 'happy', {'latitude': (self.hass.config.latitude + 0.1), 'longitude': (self.hass.config.longitude + 0.1)})
    self.hass.states.set('not_in_group.but_closer', 'happy', {'latitude': self.hass.config.latitude, 'longitude': self.hass.config.longitude})
    group.Group.create_group(self.hass, 'location    group', ['test_domain.object'])
    self.assertEqual('test_domain.object', template.Template('{{    closest("group.location_group").entity_id    }}', self.hass).render())
