aioamazondevices 1.9.0__tar.gz → 1.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aioamazondevices-1.9.0 → aioamazondevices-1.10.0}/PKG-INFO +1 -1
- {aioamazondevices-1.9.0 → aioamazondevices-1.10.0}/pyproject.toml +1 -1
- {aioamazondevices-1.9.0 → aioamazondevices-1.10.0}/src/aioamazondevices/__init__.py +1 -1
- {aioamazondevices-1.9.0 → aioamazondevices-1.10.0}/src/aioamazondevices/api.py +13 -1
- {aioamazondevices-1.9.0 → aioamazondevices-1.10.0}/LICENSE +0 -0
- {aioamazondevices-1.9.0 → aioamazondevices-1.10.0}/README.md +0 -0
- {aioamazondevices-1.9.0 → aioamazondevices-1.10.0}/src/aioamazondevices/const.py +0 -0
- {aioamazondevices-1.9.0 → aioamazondevices-1.10.0}/src/aioamazondevices/exceptions.py +0 -0
- {aioamazondevices-1.9.0 → aioamazondevices-1.10.0}/src/aioamazondevices/httpx.py +0 -0
- {aioamazondevices-1.9.0 → aioamazondevices-1.10.0}/src/aioamazondevices/py.typed +0 -0
@@ -552,7 +552,7 @@ class AmazonEchoApi:
|
|
552
552
|
|
553
553
|
if not self._csrf_cookie:
|
554
554
|
self._csrf_cookie = raw_resp.cookies.get(CSRF_COOKIE, Morsel()).value
|
555
|
-
_LOGGER.
|
555
|
+
_LOGGER.debug("CSRF cookie value: <%s>", self._csrf_cookie)
|
556
556
|
|
557
557
|
json_data = {} if len(response_data) == 0 else await raw_resp.json()
|
558
558
|
|
@@ -795,3 +795,15 @@ class AmazonEchoApi:
|
|
795
795
|
return await self._send_message(
|
796
796
|
device, AmazonSequenceType.TextCommand, message_body
|
797
797
|
)
|
798
|
+
|
799
|
+
async def set_do_not_disturb(self, device: AmazonDevice, state: bool) -> None:
|
800
|
+
"""Set do_not_disturb flag."""
|
801
|
+
payload = {
|
802
|
+
"deviceSerialNumber": device.serial_number,
|
803
|
+
"deviceType": device.device_type,
|
804
|
+
"enabled": state,
|
805
|
+
}
|
806
|
+
url = f"https://alexa.amazon.{self._domain}/api/dnd/status"
|
807
|
+
await self._session_request(
|
808
|
+
method="PUT", url=url, input_data=payload, json_data=True
|
809
|
+
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|