Add audio input format sensor to Sonos HT devices (#60884)
This commit is contained in:
parent
b61dede826
commit
cbf2bf2e1f
5 changed files with 60 additions and 3 deletions
|
@ -46,6 +46,7 @@ from .const import (
|
|||
SCAN_INTERVAL,
|
||||
SONOS_CHECK_ACTIVITY,
|
||||
SONOS_CREATE_ALARM,
|
||||
SONOS_CREATE_AUDIO_FORMAT_SENSOR,
|
||||
SONOS_CREATE_BATTERY,
|
||||
SONOS_CREATE_LEVELS,
|
||||
SONOS_CREATE_MEDIA_PLAYER,
|
||||
|
@ -240,6 +241,11 @@ class SonosSpeaker:
|
|||
|
||||
dispatcher_send(self.hass, SONOS_CREATE_LEVELS, self)
|
||||
|
||||
if audio_format := self.soco.soundbar_audio_input_format:
|
||||
dispatcher_send(
|
||||
self.hass, SONOS_CREATE_AUDIO_FORMAT_SENSOR, self, audio_format
|
||||
)
|
||||
|
||||
if battery_info := fetch_battery_info_or_none(self.soco):
|
||||
self.battery_info = battery_info
|
||||
# Battery events can be infrequent, polling is still necessary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue