'Test closest function state with invalid location.'

def test_closest_function_state_with_invalid_location(self):

    self.hass.states.set('test_domain.closest_home', 'happy', {'latitude': 'invalid    latitude', 'longitude': (self.hass.config.longitude + 0.1)})
    self.assertEqual('None', template.Template('{{    closest(states.test_domain.closest_home,    states)    }}', self.hass).render())
