diff --git a/homeassistant/components/lg_netcast/media_player.py b/homeassistant/components/lg_netcast/media_player.py index e204d465ec8b..f3e7e44fe5a2 100644 --- a/homeassistant/components/lg_netcast/media_player.py +++ b/homeassistant/components/lg_netcast/media_player.py @@ -208,7 +208,7 @@ class LgTVDevice(MediaPlayerEntity): def turn_on(self): """Turn on the media player.""" if self._on_action_script: - self._on_action_script.run() + self._on_action_script.run(context=self._context) def volume_up(self): """Volume up the media player.""" diff --git a/homeassistant/components/philips_js/media_player.py b/homeassistant/components/philips_js/media_player.py index 7e2e126437c6..451e8d6a3c2e 100644 --- a/homeassistant/components/philips_js/media_player.py +++ b/homeassistant/components/philips_js/media_player.py @@ -96,7 +96,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None): class PhilipsTVMediaPlayer(MediaPlayerEntity): """Representation of a Philips TV exposing the JointSpace API.""" - def __init__(self, tv, name, on_script): + def __init__(self, tv: PhilipsTV, name: str, on_script: Script): """Initialize the Philips TV.""" self._tv = tv self._name = name @@ -193,7 +193,7 @@ class PhilipsTVMediaPlayer(MediaPlayerEntity): def turn_on(self): """Turn on the device.""" if self._on_script: - self._on_script.run() + self._on_script.run(context=self._context) self._update_soon(DELAY_ACTION_ON) def turn_off(self): diff --git a/homeassistant/components/wake_on_lan/switch.py b/homeassistant/components/wake_on_lan/switch.py index 94bc83b7dd47..491bae782c52 100644 --- a/homeassistant/components/wake_on_lan/switch.py +++ b/homeassistant/components/wake_on_lan/switch.py @@ -117,7 +117,7 @@ class WolSwitch(SwitchEntity): def turn_off(self, **kwargs): """Turn the device off if an off action is present.""" if self._off_script is not None: - self._off_script.run() + self._off_script.run(context=self._context) def update(self): """Check if device is on and update the state."""