fix hass.loop.run_in_executor in mediaplayer init (#5320)
parent
c3783bf49b
commit
f2a42d767e
|
@ -756,7 +756,7 @@ class MediaPlayerDevice(Entity):
|
||||||
"""
|
"""
|
||||||
if hasattr(self, 'volume_up'):
|
if hasattr(self, 'volume_up'):
|
||||||
# pylint: disable=no-member
|
# 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:
|
if self.volume_level < 1:
|
||||||
yield from self.async_set_volume_level(
|
yield from self.async_set_volume_level(
|
||||||
|
@ -770,7 +770,7 @@ class MediaPlayerDevice(Entity):
|
||||||
"""
|
"""
|
||||||
if hasattr(self, 'volume_down'):
|
if hasattr(self, 'volume_down'):
|
||||||
# pylint: disable=no-member
|
# 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:
|
if self.volume_level > 0:
|
||||||
yield from self.async_set_volume_level(
|
yield from self.async_set_volume_level(
|
||||||
|
|
Loading…
Reference in New Issue