Expose sound cards and profiles with endpoint (#1534)

* Expose sound cards and profiles with endpoint

* Fix naming

* Fix issue

* Update API
This commit is contained in:
Pascal Vizeli
2020-02-27 16:25:04 +01:00
committed by GitHub
parent 9393521f98
commit 6721b8f265
7 changed files with 139 additions and 26 deletions

View File

@@ -42,11 +42,11 @@ class APIHardware(CoreSysAttributes):
ATTR_AUDIO: {
ATTR_INPUT: {
profile.name: profile.description
for profile in self.sys_host.sound.input_profiles
for profile in self.sys_host.sound.inputs
},
ATTR_OUTPUT: {
profile.name: profile.description
for profile in self.sys_host.sound.output_profiles
for profile in self.sys_host.sound.outputs
},
}
}