3 Commits

Author SHA1 Message Date
mat1th
97834bfd5e
Update swift lint and format + appy fixes (#2585)
## Summary
Swift lint and swiftformat are outdated. This PR does update those +
applies the new formatting form swiftformat.
There is 1 swift file with a manual change:
`Sources/Vehicle/Templates/Areas/CarPlayAreasViewModel.swift`. This is
done because `swiftlint` did create the following swiftlint error:
`error: Cyclomatic Complexity Violation: Function should have complexity
10 or less; currently complexity is 11 (cyclomatic_complexity)`.

Because it does change a lot of files the question is if we want to
finetune the `swiftformat` rules.

## Screenshots
No user facing changes.

## Link to pull request in Documentation repository
NA

## Any other notes
NA
2024-02-22 13:06:39 +01:00
Bruno Pantaleão Gonçalves
e8598d913c
Wrap CoreMediaIO inside macCatalyst condition (#2452)
Apparently `#if canImport(CoreMediaIO)` is now true even if you are
trying to run the App on iOS instead of macOS, so this PR wraps it also
under `#if targetEnvironment(macCatalyst)`
2023-11-16 10:01:15 +01:00
Zac West
546125dc0d
Add Audio Output sensors, rename Microphone to Audio Input (#1978)
Fixes #1958.

## Summary
Existing Core Audio stuff already exposes the output devices pretty easily, so creating sensors from 'em is pretty easy.

## Sensor Values
Roughly identical to microphones:

| Sensor | Attributes | Description |
| --------- | --------- | ----------- |
| `sensor.active_audio_input` | `All`, `Active` | The name of the active audio input (microphone), or `Inactive` if not in use. |
| `sensor.active_audio_output` | `All`, `Active` | The name of the active audio output (speaker), or `Inactive` if not in use. |
| `binary_sensor.audio_input_in_use` | None | Whether an audio output (microphone) on the system is currently in use. |
| `binary_sensor.audio_output_in_use` | None | Whether an audio output (speaker) on the system is currently in use. |

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#627

## Any other notes
This updates relatively instantly for when output starts, but takes a few seconds before it updates once output pauses.

Existing `microphone` sensors won't have their unique IDs changed, but their display name will change. New installs will get the new unique ID.
2021-12-07 09:18:32 -08:00