Add support for 'Send Current Position' feature in Geofency 5.1 (#10012)
This commit is contained in:
1 parent
c0eaf0386c
commit
25a25dde7a
2 files changed
+27
-2
No files matched your search
@@ -170,6 +170,21 @@ def test_gps_enter_and_exit_home(hass, geofency_client):
|
||||
'device_tracker', device_name)).state
|
||||
assert STATE_NOT_HOME == state_name
|
||||
|
||||
# Exit the Home zone with "Send Current Position" enabled
|
||||
data = GPS_EXIT_HOME.copy()
|
||||
data['currentLatitude'] = NOT_HOME_LATITUDE
|
||||
data['currentLongitude'] = NOT_HOME_LONGITUDE
|
||||
|
||||
req = yield from geofency_client.post(URL, data=data)
|
||||
assert req.status == HTTP_OK
|
||||
device_name = slugify(GPS_EXIT_HOME['device'])
|
||||
current_latitude = hass.states.get('{}.{}'.format(
|
||||
'device_tracker', device_name)).attributes['latitude']
|
||||
assert NOT_HOME_LATITUDE == current_latitude
|
||||
current_longitude = hass.states.get('{}.{}'.format(
|
||||
'device_tracker', device_name)).attributes['longitude']
|
||||
assert NOT_HOME_LONGITUDE == current_longitude
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def test_beacon_enter_and_exit_home(hass, geofency_client):
|
||||
|
||||
Reference in new issue
Block a user