Fix peripheral volume_muted state (#403)
Enable updating the `volume_muted` status when muting/unmuting the media player volume, and improve its tracking.
This commit is contained in:
1 parent
e334aa3fb1
commit
8303a96279
12 files changed
+177
-18
No files matched your search
@@ -278,6 +278,7 @@ class PeripheralAPIServer:
|
||||
"data": {
|
||||
"muted": state.muted,
|
||||
"volume": round(state.volume, 3),
|
||||
"volume_muted": state.volume == 0.0,
|
||||
"ha_connected": state.connected,
|
||||
"last_stt_text": self._last_stt_text,
|
||||
"last_tts_text": self._last_tts_text,
|
||||
@@ -659,6 +660,7 @@ class PeripheralAPIServer:
|
||||
LVAEvent.MEDIA_PLAYER_PLAYING,
|
||||
LVAEvent.DISCONNECTED,
|
||||
LVAEvent.PIPELINE_ERROR,
|
||||
LVAEvent.VOLUME_MUTED,
|
||||
}
|
||||
if event in _STATE_EVENTS:
|
||||
self._current_state = event
|
||||
|
||||
Reference in new issue
Block a user