From 511da9557b655e5b2a10bde0ef4b1137e72a14d7 Mon Sep 17 00:00:00 2001 From: Harryjholmes <31574402+Harryjholmes@users.noreply.github.com> Date: Thu, 9 Jul 2020 16:19:49 +0100 Subject: [PATCH] Change audio sample rate for apple watch homekit camera (#37637) * Update type_cameras.py * Apply suggestions from code review Support both 24kHz and 16kHz sample rate Co-authored-by: J. Nick Koston * Adjust formatting * Reformat Co-authored-by: J. Nick Koston --- homeassistant/components/homekit/type_cameras.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/homekit/type_cameras.py b/homeassistant/components/homekit/type_cameras.py index 8849a75ec37..f01840cf062 100644 --- a/homeassistant/components/homekit/type_cameras.py +++ b/homeassistant/components/homekit/type_cameras.py @@ -164,7 +164,12 @@ class Camera(HomeAccessory, PyhapCamera): }, "resolutions": resolutions, } - audio_options = {"codecs": [{"type": "OPUS", "samplerate": 24}]} + audio_options = { + "codecs": [ + {"type": "OPUS", "samplerate": 24}, + {"type": "OPUS", "samplerate": 16}, + ] + } stream_address = config.get(CONF_STREAM_ADDRESS, get_local_ip())