Skip to content

Commit

Permalink
Rename iOS audio sensor values (#3237)
Browse files Browse the repository at this point in the history
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
  • Loading branch information
bgoncal authored Dec 5, 2024
1 parent 882d804 commit 87306ea
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions Sources/Shared/API/Webhook/Sensors/AudioOutputSensor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,35 +50,36 @@ final class AudioOutputSensor: SensorProvider {

switch type {
case .airPlay:
audioOutput.type = "airplay"
audioOutput.type = "AirPlay"
case .bluetoothA2DP:
audioOutput.type = "bluetoothA2DP"
audioOutput.type = "Bluetooth A2DP"
case .bluetoothHFP:
audioOutput.type = "bluetoothHFP"
audioOutput.type = "Bluetooth HFP"
case .bluetoothLE:
audioOutput.type = "bluetoothLE"
audioOutput.type = "Bluetooth LE"
case .builtInMic:
audioOutput.type = "builtInMic"
audioOutput.type = "Built-in Mic"
case .builtInReceiver:
audioOutput.type = "builtInReceiver"
audioOutput.type = "Built-in Receiver"
case .builtInSpeaker:
audioOutput.type = "builtInSpeaker"
audioOutput.type = "Built-in Speaker"
case .carAudio:
audioOutput.type = "carAudio"
// Car Audio is always CarPlay https://bignerdranch.com/blog/detecting-caraudio/
audioOutput.type = "CarPlay"
case .HDMI:
audioOutput.type = "HDMI"
case .headphones:
audioOutput.type = "headphones"
audioOutput.type = "Headphones"
case .headsetMic:
audioOutput.type = "headsetMic"
audioOutput.type = "Headset Mic"
case .lineIn:
audioOutput.type = "lineIn"
audioOutput.type = "Line In"
case .lineOut:
audioOutput.type = "lineOut"
audioOutput.type = "Line Out"
case .usbAudio:
audioOutput.type = "usbAudio"
audioOutput.type = "Usb Audio"
default:
audioOutput.type = "unknown"
audioOutput.type = "Unknown"
}
return audioOutput
}
Expand Down

0 comments on commit 87306ea

Please sign in to comment.