fix hass.loop.run_in_executor in mediaplayer init (#5320)

pull/5322/head
joopert 2017-01-14 14:54:00 +01:00 committed by Pascal Vizeli
parent c3783bf49b
commit f2a42d767e
1 changed files with 2 additions and 2 deletions

View File

@ -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(