mirror of
https://github.com/USA-RedDragon/badnest.git
synced 2025-03-15 10:37:50 +00:00
Update api.py
This commit is contained in:
parent
a259bafaef
commit
6022adc4cf
@ -193,13 +193,9 @@ class NestAPI():
|
|||||||
'Referer': 'https://home.nest.com/',
|
'Referer': 'https://home.nest.com/',
|
||||||
'cookie': f"cztoken={self._access_token}"
|
'cookie': f"cztoken={self._access_token}"
|
||||||
}
|
}
|
||||||
r = self._session.get(url=f"{CAMERA_WEBAPI_BASE}/api/cameras."
|
r = self._session.get(url=f"{CAMERA_WEBAPI_BASE}/api/cameras.get_with_properties?uuid="+camera
|
||||||
+ "get_with_properties"
|
|
||||||
, params= {
|
|
||||||
"uuid": self.device_data[camera]['uuid']
|
|
||||||
}
|
|
||||||
, headers=headers)
|
, headers=headers)
|
||||||
sensor_data = r.json()["items"]
|
sensor_data = r.json()["items"][0]
|
||||||
self.device_data[camera]['name'] = \
|
self.device_data[camera]['name'] = \
|
||||||
sensor_data["name"]
|
sensor_data["name"]
|
||||||
self.device_data[camera]['is_online'] = \
|
self.device_data[camera]['is_online'] = \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user