Add Audio Output sensors, rename Microphone to Audio Input #1978
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.active_audio_input
All
,Active
Inactive
if not in use.sensor.active_audio_output
All
,Active
Inactive
if not in use.binary_sensor.audio_input_in_use
binary_sensor.audio_output_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.