def test_device_tracker_test1_away(self):
        assert proximity.setup(self.hass, {
            'proximity': {
                'zone': 'home',
                'ignored_zones': {
                    'work'
                },
                'devices': {
                    'device_tracker.test1'
                },
                'tolerance': '1'
            }
        })

        self.hass.states.set(
            'device_tracker.test1', 'not_home',
            {
                'friendly_name': 'test1',
                'latitude': 20.1,
                'longitude': 10.1
            })
        self.hass.pool.block_till_done()
        state = self.hass.states.get('proximity.home')
        assert state.attributes.get('nearest') == 'test1'
        assert state.attributes.get('dir_of_travel') == 'unknown'
Close the page in the notebook.
dataset/ETHPy150Open home-assistant/home-assistant/tests/components/test_proximity.py/TestProximity.test_device_tracker_test1_away--crossover with--dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/wx/wx_page.py/wxPage.Close