Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ async def async_submit_start_sound_request(
gcm_registration_id: str,
*,
session: Optional[ClientSession] = None,
cache: Optional[any] = None,
) -> Optional[tuple[str, str]]:
"""Submit a 'Play Sound' action using the shared async Nova client.

Expand All @@ -70,7 +71,7 @@ async def async_submit_start_sound_request(
hex_payload, request_uuid = start_sound_request(canonic_device_id, gcm_registration_id)
try:
# The async Nova client manages session reuse internally; do not pass session through.
response_hex = await async_nova_request(NOVA_ACTION_API_SCOPE, hex_payload)
response_hex = await async_nova_request(NOVA_ACTION_API_SCOPE, hex_payload, cache=cache)
return (response_hex, request_uuid) if response_hex is not None else None
except asyncio.CancelledError:
raise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ async def async_submit_stop_sound_request(
*,
request_uuid: Optional[str] = None,
session: Optional[ClientSession] = None,
cache: Optional[any] = None,
) -> Optional[str]:
"""Submit a 'Stop Sound' action using the shared async Nova client.

Expand All @@ -71,7 +72,7 @@ async def async_submit_stop_sound_request(
hex_payload = stop_sound_request(canonic_device_id, gcm_registration_id, request_uuid)
try:
# The async Nova client manages session reuse internally; do not pass session through.
return await async_nova_request(NOVA_ACTION_API_SCOPE, hex_payload)
return await async_nova_request(NOVA_ACTION_API_SCOPE, hex_payload, cache=cache)
except asyncio.CancelledError:
raise
except NovaRateLimitError:
Expand Down