Skip to content

Commit

Permalink
Fix for Issue 1347: fix regexp (#1354)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris authored Mar 22, 2021
1 parent e7da4b0 commit 50abcaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/bluetooth-sink-switch/bt-sink-switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def bt_switch(cmd, led_pin=None):
isSpeakerOn_console = subprocess.run("mpc outputs", shell=True, check=False, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
logger.debug(isSpeakerOn_console.stdout)
isSpeakerOn = re.search(b"1.*enabled", isSpeakerOn_console.stdout)
isSpeakerOn = re.search(b"^Output 1.*enabled", isSpeakerOn_console.stdout)

# Figure out if a bluetooth device is connected (any device will do). Assume here that only speakers/headsets will be connected
# -> No need for user to adapt MAC address
Expand Down

0 comments on commit 50abcaf

Please sign in to comment.