Add available and state valid property to PulseAudio#33393
Add available and state valid property to PulseAudio#33393breiti wants to merge 1 commit intohome-assistant:devfrom
Conversation
|
You need to use a library to speak with PulseAudio, use: https://github.com/mk-fg/python-pulse-control based on: https://developers.home-assistant.io/docs/creating_component_code_review#4-communication-with-devicesservices This library is supported by Home Assistant because we use also PulseAudio in the background. |
|
While I understand the need for an external library, please note that this PR does not add any new library code but only makes minor changes to already existing code in Home Assistant. Migrating to a library is definitely useful, but this should be a different PR. |
Until the first response from the PulseAudio server is received, all switches are reported "off", which is not necessarily the correct representation. This change marks the switch as "not available" until the first valid list of loaded modules is received and solves home-assistant#32016.
|
@pvizeli: As you suggested, I started to work on replacing the internal library with the |
|
After installing libpulse inside the container ( |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Requesting changes to keep track of PR status.
As stated above, please extract the device specific interface code and data parsing to a standalone library published on PyPI.
|
Is added to docker now |
|
Extracting library in #34965, making this PR obsolete. |
Proposed change
Until the first response from the PulseAudio server is received, all switches are reported "off", which is not necessarily the correct representation. This change marks the switch as "not available" until the first valid list of loaded modules
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale: