mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
fix hass.loop.run_in_executor in mediaplayer init (#5320)
This commit is contained in:
parent
c3783bf49b
commit
f2a42d767e
@ -756,7 +756,7 @@ class MediaPlayerDevice(Entity):
|
||||
"""
|
||||
if hasattr(self, 'volume_up'):
|
||||
# pylint: disable=no-member
|
||||
yield from self.hass.run_in_executor(None, self.volume_up)
|
||||
yield from self.hass.loop.run_in_executor(None, self.volume_up)
|
||||
|
||||
if self.volume_level < 1:
|
||||
yield from self.async_set_volume_level(
|
||||
@ -770,7 +770,7 @@ class MediaPlayerDevice(Entity):
|
||||
"""
|
||||
if hasattr(self, 'volume_down'):
|
||||
# pylint: disable=no-member
|
||||
yield from self.hass.run_in_executor(None, self.volume_down)
|
||||
yield from self.hass.loop.run_in_executor(None, self.volume_down)
|
||||
|
||||
if self.volume_level > 0:
|
||||
yield from self.async_set_volume_level(
|
||||
|
Loading…
x
Reference in New Issue
Block a user