From e55955d976bac64ca347646ffa9cfe5bd721c942 Mon Sep 17 00:00:00 2001 From: Mathieu Broillet Date: Sat, 30 Dec 2023 20:12:35 +0100 Subject: [PATCH] fix default output/input not set --- custom_components/easy_computer_manager/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/custom_components/easy_computer_manager/utils.py b/custom_components/easy_computer_manager/utils.py index 3a86079..9871e36 100644 --- a/custom_components/easy_computer_manager/utils.py +++ b/custom_components/easy_computer_manager/utils.py @@ -409,6 +409,12 @@ def change_audio_config(connection: Connection, volume: int, mute: bool, input_d return device['name'] return user_device + # Set default sink and source if not specified + if not output_device: + output_device = "@DEFAULT_SINK@" + if not input_device: + input_device = "@DEFAULT_SOURCE@" + # Set default sink if specified if output_device and output_device != "@DEFAULT_SINK@": output_device = get_device_id('sinks', output_device)